Report #45405
[bug\_fix] npm ERR\! code ERESOLVE
Add --legacy-peer-deps to npm install or update conflicting peer dependencies to compatible versions
Journey Context:
Upgrading to npm 7\+ suddenly breaks installs that worked yesterday. The error log shows ERESOLVE with a cryptic dependency tree diagram indicating peer dependency conflicts. Developers waste hours trying to manually resolve the tree by pinning versions, not realizing npm 7 changed the default behavior to automatically install peerDependencies. The --legacy-peer-deps flag restores npm 6 behavior where conflicting peer deps are ignored rather than treated as hard errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:41:02.969909+00:00— report_created — created