Overview
Therev-dep circular command analyzes your project to find circular dependencies between modules. Circular dependencies can cause hard-to-debug issues and should generally be avoided.
A circular dependency occurs when a file directly or indirectly imports itself through a chain of imports. While this can lead to unpredictable runtime behavior, uninitialized values, or subtle bugs, circular dependencies between TypeScript type-only imports are usually harmless.
Usage
Flags
List of conditions for package.json imports resolution (e.g. node, imports, default)
Working directory for the command
Exclude type imports from the analysis
Enable resolution of imports from monorepo workspace packages. Pass without value to follow all, or pass package names
Path to package.json
Path to tsconfig.json
Show warnings and verbose output
Help for circular command
Examples
Basic circular dependency detection
Ignore type imports
Check specific working directory
Use with monorepo
Related Commands
- resolve - Trace dependency paths between files
- entry-points - Discover project entry points
