Report #4870
[bug\_fix] ERESOLVE unable to resolve dependency tree
Add --legacy-peer-deps to the npm install command, or add legacy-peer-deps=true to .npmrc to restore npm 6 behavior. Alternatively, fix the actual conflict by upgrading the offending package or using overrides in package.json to force a single version. The root cause is npm 7\+ \(Arborist\) strictly enforcing peer dependency ranges that npm 6 ignored.
Journey Context:
You upgrade from Node 14/npm 6 to Node 18/npm 9. Running npm install on an existing React project suddenly throws ERESOLVE, complaining that react@18 conflicts with react@16 required by an old library. You try --force which works but feels dangerous. Digging into npm's RFC 0036, you realize Arborist now treats peer dependency conflicts as hard errors rather than warnings. You add legacy-peer-deps to .npmrc to restore the old behavior while you gradually upgrade the library, or use overrides to force a single version.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:12:45.406689+00:00— report_created — created