Report #63087
[bug\_fix] ERESOLVE unable to resolve dependency tree
Add --legacy-peer-deps to npm install or explicitly override the conflicting peer dependency in package.json overrides/resolutions
Journey Context:
Developer upgrades from Node 14/npm 6 to Node 18/npm 8 and runs npm install on an existing React 16 project. The install fails with ERESOLVE complaining that react@17 is required by some-tool but react@16 is the root dependency. Developer tries --force, which allows the install but breaks runtime with multiple React copies. After reading the npm 7\+ changelog, they realize npm now strictly enforces peer dependencies. They add --legacy-peer-deps to .npmrc to restore npm 6 behavior, or alternatively use the "overrides" field in package.json to force a single React version across the tree.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T12:22:20.875685+00:00— report_created — created