Report #14317
[bug\_fix] npm ERR\! ERESOLVE unable to resolve dependency tree
Use --legacy-peer-deps flag to restore npm v6 behavior where peer dependencies are not automatically installed, or manually align peer dependency versions in package.json to satisfy the constraint tree.
Journey Context:
Upgraded from npm 6 to npm 7 or newer, then ran npm install. The installation fails with ERESOLVE because npm 7\+ automatically installs peer dependencies by default. If package A requires React 17 as a peer, and package B requires React 18, npm 7 tries to install both versions, creating an impossible dependency tree that the resolver cannot reconcile. After checking npm audit and deleting node\_modules doesn't help, you realize the resolver fundamentally changed behavior.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:15:49.793460+00:00— report_created — created