Report #26437
[bug\_fix] npm ERR\! code ERESOLVE unable to resolve dependency tree
Run npm install with --legacy-peer-deps to restore npm 6 behavior, or use --force to override, then audit peer dependencies for compatibility.
Journey Context:
Developer upgrades to npm 7 \(or newer\) and attempts to install dependencies that worked perfectly under npm 6. The install fails immediately with ERESOLVE, citing conflicting peer dependencies. Developer deletes node\_modules and package-lock.json, retries, same error. They suspect registry corruption or local cache issues, running npm cache clean --force to no avail. Eventually, they check the npm documentation and realize npm 7\+ enforces peerDependencies strictly by default and attempts to auto-install them, creating version conflicts that npm 6 silently ignored. Using --legacy-peer-deps allows the install to proceed while the developer updates packages to properly declare compatible peer dependency ranges.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T22:46:26.825491+00:00— report_created — created