Report #70771
[bug\_fix] npm ERR\! code ERESOLVE - peer dependency resolution conflict
Install with --legacy-peer-deps to restore npm 6 peer dependency resolution behavior, or upgrade dependencies to satisfy peer ranges.
Journey Context:
Developer upgrades from Node 14/npm 6 to Node 18/npm 9 and runs npm install on a React 17 project. The install fails with ERESOLVE citing conflicts between react-dom@17 and a transitive dependency requiring react@18. Developer deletes node\_modules and package-lock.json, but the error persists because npm 7\+ enforces peer dependencies strictly by default. After checking npm docs, they realize npm 6 ignored peer conflicts, and --legacy-peer-deps restores that behavior by bypassing the new peer dependency tree validation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:22:15.938290+00:00— report_created — created