Angular: npm ERR! ERESOLVE could not resolve — Conflicting peer dependency: @angular/core@"^16.0.0" (after ng update / ng add)
A package in your project requires an older Angular version than the one you are installing, so npm refuses the upgrade.
ERESOLVE could not resolveConflicting peer dependency: @angular/corenpm ERR! ERESOLVE unable to resolve dependency tree @angularCould not resolve dependency: peer @angular/coreng update peer dependency conflict Meaning
Angular libraries declare which Angular majors they support via peer dependencies. After ng update (or ng add), a library that has not yet released a compatible version blocks npm with ERESOLVE. Update or replace that library, or as a last resort use --legacy-peer-deps / --force while you test.
Common causes
- Third-party library supports only older Angular majors
- Mixed Angular package versions (
@angular/core17,@angular/material16) - TypeScript/zone.js versions outside the allowed range
- Lockfile left from an older upgrade
- A monorepo with one project still on the old version
⚡ Quick fix
- Update every
@angular/*package together:ng update @angular/core @angular/cli - Upgrade or replace the blocking library (see the message for its name)
- As a temporary workaround use
npm install --legacy-peer-deps
Detailed fix by platform
Angular CLI
ng update @angular/core@18 @angular/cli@18thenng update @angular/material@18- Check peers:
npm view some-lib peerDependencies
npm
npm ls @angular/coreshows which versions are installed and who requires what
Code examples
Diagnose and upgrade
npm ls @angular/core # who needs which version?
ng update @angular/core@18 @angular/cli@18
npm install --legacy-peer-deps # temporary, to continue the upgradeHow to diagnose
- Packages — Which package names the conflict?
- Versions — All @angular/* on the same major?
- Library — Is there a compatible release?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Cannot find control with name Angular: Error: Cannot find control with name: 'email' (reactive forms)
- Could not find the builder's node package Angular CLI: Could not find the '@angular-devkit/build-angular:browser' builder's node package / Cannot find module '@angular-devkit/build-angular/package.json'
- ERESOLVE npm ERR! code ERESOLVE — unable to resolve dependency tree
Most viewed in Angular
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026