Skip to main content

Resolve dependency path

Use resolve when you need to know whether - and how - a file or package is reachable from your entry points. It prints the import paths that lead to the target.

rev-dep resolve --file src/utils/math.ts
rev-dep resolve --file src/utils/math.ts --entry-points src/index.ts
rev-dep resolve --module react --entry-points src/index.ts

Provide exactly one of --file (a project file) or --module (a package name). When --entry-points is omitted, entry points are auto-detected.

This is one of the best commands for explaining unexpected reachability.

Useful flags​

rev-dep resolve --file src/utils/math.ts --all
rev-dep resolve --file src/utils/math.ts --compact-summary
rev-dep resolve --file src/utils/math.ts --graph-exclude '**/*.test.ts'
rev-dep resolve --module react --follow-monorepo-packages
  • --all shows every resolution path, not just the first one found per entry point.
  • --compact-summary prints a count of paths per entry point instead of the full paths.
  • --entry-points accepts multiple files or globs (-p for short).

To list what an entry point pulls in instead, use files.