Skip to main content
Solutions to common problems when using React Doctor.

Node.js Version Issues

React Doctor requires specific Node.js versions for lint checks.

Required Version

Oxlint (the linter used by React Doctor) requires:
Node.js ^20.19.0 or >=22.12.0
Check your version:

Unsupported Node.js Version

If you see:
You have three options:

Option 1: Upgrade Node.js

React Doctor can install a compatible Node.js version automatically:
Or manually:
React Doctor will use Node 24 from nvm for lint checks while keeping your system Node.js version unchanged.

Option 3: Use npx with Matching Node

This bundles oxlint with native bindings for your Node version.

nvm Not Installed

If you don’t have nvm:
Windows users: Use nvm-windows

Native Binding Error

If you see:
This means oxlint can’t find prebuilt binaries for your Node version. Solution:
Or upgrade Node.js to v24 (recommended).
React Doctor will skip lint checks if Node.js is incompatible. You’ll only get dead code detection results.

Performance Issues

React Doctor can be slow on large codebases.

Scan Takes Too Long

Use Diff Mode

Scan only changed files:
This is 10-100× faster than full scans.

Select Specific Project

In monorepos, scan one project:

Disable Dead Code Detection

Dead code analysis is slow on large projects:
Or in config:
react-doctor.config.json

Ignore Generated Files

Exclude large generated directories:
react-doctor.config.json
Combine strategies for maximum speed: npx react-doctor . --project web --diff --no-dead-code

Knip Hangs or Times Out

Dead code detection (via Knip) can stall on complex projects. Solution 1: Increase timeout in Knip config Create knip.json:
knip.json
Solution 2: Disable dead code detection
Solution 3: Use diff mode (skips dead code automatically)

Installation Issues

npx Command Not Found

npx comes with npm. Ensure Node.js is installed:
If not installed, download from nodejs.org.

Permission Denied

On macOS/Linux:
Or fix npm permissions: docs.npmjs.com/resolving-eacces-permissions-errors

Slow Installation

React Doctor downloads dependencies on first run. Use -y to auto-accept:

Score Calculation Issues

Score Not Calculated

If you see:
Causes:
  1. No internet connection - React Doctor requires API access to calculate scores
  2. Firewall blocking - Corporate firewalls may block react.doctor API
  3. Using —offline flag - You explicitly disabled telemetry
Solutions:
  • Connect to the internet
  • Check firewall settings
  • Remove --offline flag
React Doctor sends diagnostics (anonymized) to calculate accurate scores. No source code is transmitted.

Score Seems Wrong

Scores are based on unique rule violations, not total occurrences. Example:
  • 100 diagnostics from 5 unique rules = Score ~92
  • 10 diagnostics from 10 unique rules = Score ~85
See Understanding Scores for details.

Score Doesn’t Improve After Fixes

If the score stays the same after fixes:
  1. Verify fixes applied - Run with --verbose to see remaining issues
  2. Check suppressed rules - Suppressed rules still count toward total
  3. New issues introduced - Fixes may have created new violations
Re-run with verbose output:

Configuration Issues

Config Not Loaded

React Doctor looks for:
  1. react-doctor.config.json in project root
  2. reactDoctor key in package.json
Verify config location:
Test config:

Invalid Config Format

Config must be valid JSON:
react-doctor.config.json
Validate JSON syntax: jsonlint.com

Rules Still Appearing After Suppression

Ensure rule names match exactly:
Run with --verbose to see exact rule names:

Git and Diff Mode Issues

”Not a git repository”

Diff mode requires Git:

No Changed Files Detected

If React Doctor says no changes:
  1. Commit your changes - Git only detects committed changes
  2. Specify base branch - npx react-doctor . --diff main
  3. Check file types - Only .ts, .tsx, .js, .jsx are scanned
List changed files:

Base Branch Not Found

React Doctor looks for main then master. If neither exists:
Or create the base branch:

CI/CD Issues

GitHub Actions: fetch-depth Error

Diff mode needs Git history:

CI Hangs or Times Out

Large codebases can exceed CI time limits: Solution 1: Use diff mode
Solution 2: Disable dead code detection
Solution 3: Increase timeout

CI Fails with Exit Code 1

If you’re using --fail-on flag:
React Doctor exits with code 1 when errors are found. This is expected behavior. To ignore in CI:
Or remove --fail-on flag.

Monorepo Issues

Workspaces Not Detected

React Doctor requires workspace config: npm/Yarn/pnpm:
package.json
pnpm:
pnpm-workspace.yaml
Verify workspaces:

Project Not Found

If --project fails:
Use the exact name shown in the prompt.

Scanning Takes Too Long in Monorepo

Scan specific projects:
See Monorepo Projects for optimization tips.

Output and Display Issues

Colors Not Showing

Terminals without color support:
Or disable colors:

Verbose Output Truncated

Full diagnostics are written to temp directory:
Read specific rules:

JSON Output

For programmatic use:

Coding Agent Integration Issues

Skill Not Recognized

Re-install the skill:
Verify installation:

Agent Doesn’t Run Automatically

Coding agents run React Doctor when:
  1. You explicitly ask (“run react-doctor”)
  2. After completing React changes (if skill is installed)
Manually trigger:
See Using with Coding Agents for details.

Getting Help

If you’re still stuck:

Check GitHub Issues

Search existing issues: github.com/millionco/react-doctor/issues

Enable Verbose Mode

Provides detailed diagnostics.

Run with Debug Info

Shows internal logs.

Open an Issue

Report bugs: github.com/millionco/react-doctor/issues/new Include:
  • React Doctor version (npx react-doctor --version)
  • Node.js version (node --version)
  • Operating system
  • Full error message
  • Command you ran
Most issues are Node.js version mismatches or Git configuration problems. Check those first!