Resolver CLI
Accept an importer path and a specifier, choose the right resolver branch, keep mode and condition options explicit, and print either text or JSON traces.
Build a local resolver tool that explains how Node turns an importer and specifier into a selected module, which package rules changed the path, and where CommonJS, ESM, caches, cycles, and symlinks can change what a developer sees.
$ npm run fixturesBuilds the package trees used by every trace.
$ npm run resolve -- fixtures/generated/app/src/index.cjs ./localShows extension probing and package boundary details.
$ npm run resolve -- fixtures/generated/app/src/index.cjs pkg-exports/featureWalks the package exports decision path.
$ npm run cache -- fixtures/generated/cycles/a.cjs --format jsonRecords loaded modules and cycle shape.
$ npm run inspect-package -- fixtures/generated/appPrints package metadata the resolver consumed.
Accept an importer path and a specifier, choose the right resolver branch, keep mode and condition options explicit, and print either text or JSON traces.
Generate small packages for main fields, exports maps, blocked subpaths, conditions, ESM, CJS, dual packages, cache cases, cycles, shadowing, and symlinks.
Record path probes, node_modules search directories, package metadata, selected export targets, condition checks, selected format, warnings, and errors.
Write text, JSON, Markdown, and self-contained HTML reports, plus cache graphs, cycle evidence, symlink notes, and interop warnings.
The build starts with the CLI contract and ends with shareable reports. Each phase adds one resolver branch, one runtime observation path, or one report surface.
Create the resolver inspector CLI and prove the command contract is stable before any resolver logic exists.
Generate controlled fixture packages that trigger every resolver branch the inspector needs to explain.
Trace CommonJS-style resolution for relative and absolute file specifiers.
Detect Node built-in module specifiers before filesystem or package lookup begins.
Walk parent directories to explain how bare package lookup selects the nearest package root.
Inspect main, type, package boundaries, legacy fallback, and selected module format.
Trace package exports for root entries, subpath exports, blocked deep imports, and invalid targets.
Explain active condition sets, condition object order, nested condition objects, and selected branches.
Compare CommonJS-style and ESM-style resolution through explicit require and import modes.
Warn when a successful resolution still creates likely consumer-side module shape problems.
Run a fixture in a child process and show which CommonJS modules were loaded and cached.
Find cycles in the loaded CommonJS module graph and show partial-load evidence.
Show how symlinks change lookup paths, real paths, and module identity.
Turn resolver traces, warnings, graph data, cycles, timeline events, and symlink notes into readable reports.
Lab 04 treats resolver evidence as data: attempted paths, package metadata, condition branches, warnings, runtime cache graphs, cycle paths, symlink notes, and final reports all come from the same model.
attempts[]exact, extension, directory, and package candidateswarnings[]interop risks with evidence and suggestionserrors[]missing files, blocked exports, and invalid targetsgraph.nodes[]loaded CommonJS module cache entriesgraph.edges[]parent-to-child require relationshipscycles[]ordered circular dependency pathssymlinks[]lookup, realpath, and identity notesmodule-inspector.htmlself-contained diagnostic reportSwitch between one-reader pricing and team licenses for up to 25 team members.
Volume I as EPUB, light/dark PDFs, slides, cheatsheets, and future updates.
All Labs plus the downloadable Volume I bundle in one purchase. Save $9.99 vs buying separately.
Seven long-form builds: recorder, binary store, stream workbench, resolver, watcher, task runtime, and protocol gateway.
Volume I files, slides, cheatsheets, and updates for a small engineering team.
Node Runtime Labs plus the downloadable Volume I bundle in one team license.
Seven long-form builds for onboarding, study groups, and internal training.
The bundle includes seven runtime projects covering process observation, binary storage, streams, module resolution, file watching, async orchestration, and custom protocols.