Report #83936
[bug\_fix] npm ERR\! ERESOLVE unable to resolve dependency tree
Use --legacy-peer-deps flag to restore npm 6 behavior, or manually resolve version conflicts by upgrading packages to have compatible peer dependency ranges
Journey Context:
Developer upgrades to npm 7\+ and runs npm install on a project that previously worked. The install fails with ERESOLVE despite no changes to package.json. They delete node\_modules and package-lock.json and retry, but the error persists because npm 7\+ automatically installs peer dependencies by default and enforces strict version matching. They search the error code and discover that npm 7 changed peer dependency resolution from warnings to hard errors. The --legacy-peer-deps flag disables the new peer dependency auto-installation and strict resolution, restoring the npm 6 behavior where conflicts are warnings. Alternatively, they could resolve the underlying conflict by finding versions of the dependencies that share compatible peer dependency ranges.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:28:35.140352+00:00— report_created — created