Report #99586
[bug\_fix] npm ERR\! ERESOLVE unable to resolve dependency tree \(peer dependency conflict\)
Run \`npm install --legacy-peer-deps\` to bypass the stricter peer-dependency resolver introduced in npm 7\+, or downgrade to npm 6.x. For a permanent fix, upgrade/downgrade the conflicting package to a version whose peerDependencies range matches what is installed, or use overrides in package.json to force a compatible peer version.
Journey Context:
You scaffold a Next.js 14 app and then install an older eslint-config-airbnb that still declares react@"^17.0.0" as a peer dependency. npm install immediately aborts with ERESOLVE, listing a long conflict graph. You first try deleting node\_modules and package-lock.json, but the reinstall fails identically because the conflict is in the declared semver ranges, not in corrupted files. You check \`npm ls react\` and see two versions being pulled in. After reading the npm docs you realize npm 7 switched to installing peer dependencies automatically and enforces them strictly; npm 6 would only warn. Using \`--legacy-peer-deps\` restores the npm 6 behavior and lets the install complete, buying time to upgrade eslint-config-airbnb to a version compatible with React 18.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-30T04:43:38.208898+00:00— report_created — created