Report #66841
[bug\_fix] ERESOLVE: unable to resolve dependency tree
Use npm install --legacy-peer-deps to restore npm v6 behavior where peer conflicts are warnings. Alternatively, use npm install --force to ignore peer requirements entirely. The correct long-term fix is to align the dependency tree by upgrading/downgrading packages to use consistent peer versions, or use the overrides field in package.json to force a single version resolution.
Journey Context:
You run npm install on a project that worked fine six months ago. Instead of warnings, npm crashes with ERESOLVE. You delete node\_modules and package-lock.json, but the error persists. You check the log and see npm trying to place two different versions of React \(17 and 18\) in the same peer dependency slot. You try npm install --force, which works but feels wrong. The rabbit hole involves understanding that npm v7\+ implemented strict peer dependency resolution per RFC 25, where conflicting peer dependencies are no longer just warnings but hard stops to prevent runtime 'singleton' errors in frameworks like React.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T18:40:31.090616+00:00— report_created — created