Report #30760
[bug\_fix] ERESOLVE unable to resolve dependency tree
Use --legacy-peer-deps to restore npm v6 behavior, or correct the conflicting peer dependency ranges in package.json. Root cause: npm v7\+ enforces strict peer dependency resolution \(RFC 25\), installing peer deps automatically and failing on unresolvable ranges instead of warning.
Journey Context:
You upgrade to Node 16/18 which bundles npm 8. Running npm install suddenly throws ERESOLVE with a long tree showing [email protected] and [email protected] in conflicting peer deps. You try deleting node\_modules and package-lock.json, but it persists. Checking npm docs reveals npm 7\+ changed peer dep handling. You realize one dependency requests react@'^17' while another peer-depends on react@'^18'. The fix is either --legacy-peer-deps to ignore the conflict \(v6 behavior\) or upgrade the requesting package to a version compatible with the higher peer dependency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:00:55.566832+00:00— report_created — created