Installation Issues
Binary Not Found
Problem: After installing Rev-dep, therev-dep command is not found.
Local Installation
Local Installation
If installed locally, use npx:Or add to package.json scripts:
Global Installation
Global Installation
Ensure your global npm bin directory is in your PATH:
Version Mismatch
Problem: Different versions of Rev-dep across team members. Solution: Pin the version in package.json:package.json
Configuration Issues
Config File Not Found
Problem: Rev-dep can’t find your configuration file. Solution: Ensure the config file is named correctly:Invalid JSON Schema
Problem: Configuration validation errors. Solution: Use the JSON schema for validation:Config Version Mismatch
Problem:configVersion doesn’t match Rev-dep version.
Solution: Use "configVersion": "1.6" for Rev-dep v2.x:
Resolution Issues
Unresolved Imports
Problem: Rev-dep reports imports as unresolved that should work.TypeScript Path Aliases
TypeScript Path Aliases
Ensure Or specify in config:
tsconfig.json is in the correct location:Package.json Exports
Package.json Exports
Verify exports field syntax:Set appropriate condition names:
package.json
Custom Asset Extensions
Custom Asset Extensions
Add custom extensions to the config:
Ignore Specific Imports
Ignore Specific Imports
Suppress false positives:
Monorepo Package Not Found
Problem: Cross-package imports not resolving in monorepo. Solution: Enable monorepo package following:Performance Issues
Slow Execution
Problem: Rev-dep takes longer than expected.Out of Memory
Problem: Node.js runs out of memory on large codebases. Solution: While Rev-dep is written in Go and doesn’t typically have memory issues, if you encounter problems:Detection Issues
False Positives: Unused Exports
Problem: Rev-dep reports exports as unused when they are actually used.Entry Points Not Configured
Entry Points Not Configured
Ensure all entry points are specified:
Exported for External Consumption
Exported for External Consumption
Ignore exports in library entry points:
Used in Non-JS Files
Used in Non-JS Files
If exports are referenced in HTML, markdown, or other files:
False Positives: Unused Node Modules
Problem: Modules flagged as unused when they’re referenced in scripts or config. Solution: Configure where to look for module usage:False Negatives: Circular Dependencies
Problem: Circular dependencies exist but aren’t detected. Solution: Check if type imports are being excluded:ignoreTypeImports: true, some circular dependencies involving types will be hidden:
Autofix Issues
Autofix Not Working
Problem: Running with--fix doesn’t apply changes.
Verify check supports autofix
Only these checks support autofix:
unusedExportsDetectionorphanFilesDetectionimportConventions
Autofix Creates Invalid Code
Problem: After autofix, code doesn’t compile. Solution: This is rare but can happen with:- Side-effect exports (exports used for their side effects, not imports)
- Dynamic imports that Rev-dep can’t trace
CI/CD Issues
Passing Locally, Failing in CI
Problem: Checks pass on local machine but fail in CI.Different Node/npm Versions
Different Node/npm Versions
Pin versions in CI:
Missing Dependencies
Missing Dependencies
Ensure all dependencies are installed:
Working Directory Mismatch
Working Directory Mismatch
Set correct working directory:
Git-ignored Files
Git-ignored Files
CI might not have generated files:
CI Too Slow
Problem: Rev-dep takes too long in CI. Solutions:Use caching
Optimize config
Use config over CLI
Config-based checks are 10x+ faster than running individual CLI commands
Reduce rule scope
Target specific packages instead of scanning everything
Getting Help
Search existing issues
Report the issue
Open a new issue with:
- Rev-dep version (
rev-dep --version) - Node version (
node --version) - Operating system
- Configuration file
- Error output
- Steps to reproduce
For questions and discussions, check the project’s GitHub repository or community forums.
