Report #17984
[bug\_fix] npm ERR\! code ERESOLVE npm ERR\! ERESOLVE could not resolve npm ERR\! While resolving: [email protected] ... npm ERR\! Found: [email protected]
Run \`npm install --legacy-peer-deps\`. Root cause: npm 7\+ uses @npmcli/arborist which enforces strict peer dependency resolution by default, whereas npm 6 was lenient. The flag restores npm 6 behavior by ignoring peer dependency conflicts.
Journey Context:
You just upgraded to Node 18 and ran \`npm install\` on a Create React App project that worked fine last month. Suddenly the install fails with ERESOLVE mentioning react and react-dom peer conflicts. You try deleting node\_modules and package-lock.json, but it fails again. You check StackOverflow and see suggestions to downgrade to npm 6, but then you notice comments mentioning --legacy-peer-deps. You run it, the install succeeds instantly, and you realize npm 7 changed peer resolution strictness.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T06:53:48.013825+00:00— report_created — created