Repository navigation
@angular/cli v20. NPM cannot resolve @angular/fire #3667
Description
Activity
Same issue here, following https://developers.google.com/codelabs/building-a-web-app-with-angular-and-firebase#9 this tutorial I am unable to install @angular/material with @angular/fire due to mentioned error above. What should I do?
Reacted by Daniela ConteSame issue
- added a commit that references this issue
on Jul 20, 2026 - addedcomp: coreFirebaseApp DI core (src/app).FirebaseApp DI core (src/app).triaged: keep-openTriaged and intentionally kept open; exempt from any future stale process.Triaged and intentionally kept open; exempt from any future stale process.type: bugDefect: expected behavior doesn't happen.Defect: expected behavior doesn't happen.version: current (v17+)Targets the current modular API (v17+).Targets the current modular API (v17+).
on Jul 25, 2026 Thanks for the report and the resolution output, which shows the conflict clearly.
The cause is a required peer dependency on
@angular/platform-browser-dynamicthat@angular/firedeclares but does not actually use. To satisfy that peer, npm picks aplatform-browser-dynamicpatch, and each such patch pins@angular/core/@angular/commonto its own exact patch version, which usually differs from the core version your app already has, so npm cannot satisfy both and you getERESOLVE.Where this stands:
- The fix (removing that unused peer) is merged to
main(PR fix(core): drop vestigial @angular/platform-browser-dynamic peer #3718), but it is not in a published release yet. Both the currentlatest(20.0.1) andnext(21.0.0-rc.0) still carry the peer, so both still reproduce this. - It will go out in the next releases on both lines; I would rather not commit to exact version numbers here until they are cut.
- In the meantime, installing with
npm i --legacy-peer-deps(or--force) is a safe workaround here, precisely because the peer is unused (nothing in the shipped package imports@angular/platform-browser-dynamic).
I will follow up on this issue once the fix is in a published release so you are not left guessing. If
--legacy-peer-depsdoes not get you unblocked, let me know.- The fix (removing that unused peer) is merged to
Following up as promised: the fix is now in published releases on both lines.
- Angular 20: AngularFire 20.1.1, now on npm's
latesttag, no longer declares the unused peer dependencies that caused thisERESOLVE.ng add @angular/fireornpm install @angular/fireinstalls it. - Angular 21: the release candidate 21.0.0-rc.2, on the
nexttag, carries the same fix.
The
--legacy-peer-depsworkaround is no longer needed. I'm closing this now. If you still hit anERESOLVEfrom@angular/fireon one of these versions, please open a new issue with the resolution output, and I'll take a look.- Angular 20: AngularFire 20.1.1, now on npm's
I'm trying to install @angular/fire to my Angular 20 project, but NPM won't resolve the package.
package.json
I'm using the
addcommandng add @angular/fireOutput
Angular version
Same thing happens if I install directly with npm
npm i @angular/fire