Report #96369
[bug\_fix] ERESOLVE unable to resolve dependency tree
Run npm install with --legacy-peer-deps flag, or downgrade to npm 6, or explicitly install the conflicting peer dependency versions to satisfy the constraint.
Journey Context:
You upgraded to npm 7 or 8 and suddenly npm install fails with ERESOLVE. The error log shows a peer dependency conflict where Package A requires React 17, but Package B requires React 18. You try deleting node\_modules and package-lock.json, but it still fails. You search and find npm RFC 25 implemented strict peer dependency checking by default in npm 7. The --legacy-peer-deps flag restores npm 6 behavior by ignoring peer dependency conflicts, allowing the install to proceed. Alternatively, you could install the specific React version that satisfies both peers if they overlap, or use overrides in package.json to force a resolution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:20:28.108000+00:00— report_created — created