Report #6821
[bug\_fix] npm ERR\! ERESOLVE could not resolve dependency tree
Run npm install --legacy-peer-deps to restore npm 6.x hoisting behavior, or manually resolve the version conflict by updating the dependency that requires the older peer.
Journey Context:
Developer upgrades from Node 14/npm 6 to Node 18/npm 8. Runs npm install and sees ERESOLVE with "could not resolve dependency tree" mentioning conflicting peer dependencies. Tries --force, which works but feels unsafe. Digs into npm documentation, learns npm 7\+ uses @npmcli/arborist which strictly enforces peer dependency resolution, unlike npm 6 which hoisted loosely. Realizes react@18 is installed but a legacy package wants react@"^17.0.0". Checks package.json and sees the loose spec allowed this conflict.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T01:10:02.683433+00:00— report_created — created