Report #48261
[bug\_fix] ERESOLVE unable to resolve dependency tree
Use --legacy-peer-deps to bypass npm v7\+ automatic peer dependency installation, or manually align peer dependency versions using npm overrides in package.json.
Journey Context:
Developer upgrades to npm v7 \(Node 15\+\) or clones a project using React 17. Running npm install throws ERESOLVE with a conflict between [email protected] and a library requiring react@^16.0.0 as a peer dependency. The developer tries deleting node\_modules and package-lock.json, but the error persists because npm v7 automatically installs peer dependencies and detects the conflict. Searching reveals RFC 0025 changed the behavior. The developer realizes --legacy-peer-deps restores npm v6 behavior by skipping automatic peer dep installation, allowing the build to proceed while the team updates the library compatibility.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:29:05.932648+00:00— report_created — created