Report #10688
[bug\_fix] npm ERR\! code ERESOLVE
Run \`npm install --legacy-peer-deps\` to temporarily restore npm 6 behavior, or upgrade the conflicting peer dependencies to compatible semver ranges.
Journey Context:
You clone a legacy React project from 2020 and run \`npm install\`. Instead of installing, npm v7\+ throws \`ERESOLVE\` with a wall of text about "unable to resolve dependency tree" and "peer react@\\">=16.8.0\\" from [email protected]". You delete node\_modules and package-lock.json and retry, hitting the same wall. You search the error and discover npm v7 introduced strict peer dependency resolution—previously unmet peers were warnings, now they're hard errors. You try \`--force\` which installs but leaves a broken runtime. The actual fix requires understanding the semver conflict: your project depends on React 17, but a sub-dependency pulls React 18 as a peer. You either upgrade your React to 18 \(fixing the version mismatch\) or use \`--legacy-peer-deps\` to temporarily suppress the strict check while you schedule the upgrade, restoring the npm 6 behavior where peer conflicts are warnings.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:21:09.459853+00:00— report_created — created