Report #53558
[bug\_fix] npm ERR\! ERESOLVE unable to resolve dependency tree
Run \`npm install --legacy-peer-deps\` to temporarily use the npm v6 peer resolution algorithm, or properly fix the dependency tree by upgrading packages to compatible versions, or use \`overrides\` in package.json to force specific versions. The root cause is that npm v7\+ enforces strict peer dependency resolution by default, whereas v6 silently ignored conflicts.
Journey Context:
Developer upgrades from Node 14/npm 6 to Node 18/npm 9. Running \`npm install\` on an existing React project fails with ERESOLVE, reporting that react-scripts requires a specific eslint version, but another dependency wants a different version. Developer tries deleting node\_modules and package-lock.json, but it persists. Realizes npm v7\+ has stricter peer dependency resolution. Using --legacy-peer-deps allows the install to proceed while the developer plans a proper migration.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:23:41.523794+00:00— report_created — created