Upgrading from AngularFire 21
This is the first release candidate of AngularFire 22, which supports Angular 22. It is published under npm's next tag. It requires Angular 22, TypeScript 6.0 and firebase 12.18.0 or newer. ng add and ng deploy work with firebase-tools 14 or 15.
From an app on Angular 21 and AngularFire 21, run one command:
ng update @angular/core@22 @angular/cli@22 @angular/fire@next
Include @angular/fire@next in the same command as Angular. On its own, ng update @angular/core@22 @angular/cli@22 refuses to run while AngularFire 21 is installed. The AngularFire 22 upgrade guide covers the rest.
On a new Angular 22 app, run ng add @angular/fire@next.
Breaking changes
Angular 22 and TypeScript 6.0 are required (#3801)
- Node.js 20 is no longer supported (end of life since 2026-04-30). Angular 22 requires Node.js 22.22.3, 24.15.0 or 26.
- TypeScript 6 may report new compiler errors that Angular's own update does not fix. It turns
stricton by default, dropsdownlevelIteration, and deprecatesbaseUrlandmoduleResolution: "node". Check yourtsconfig.jsonfor those settings.
firebase is now a peer dependency (#3805)
Through AngularFire 21, @angular/fire installed its own copy of firebase. If your package.json listed a different firebase version, npm could install both, and the two copies reject each other's objects at runtime (#3684, #3681, #3682). In AngularFire 22, the firebase version in your package.json is the only copy installed.
ng updatehandles it. The migration adds"firebase": "^12.18.0"to yourpackage.jsonif it is missing, or moves an existing entry into that range.- Installing by hand: run
npm install @angular/fire@next firebase@^12.18.0, then check thatnpm ls firebaseshows one copy. - An incompatible
firebasenow fails at install time on npm, withERESOLVE. Do not use--forceor--legacy-peer-depsto get past it, which brings the two-copy errors back.
Deprecated
Deploying server-side rendering to Cloud Functions with ng deploy (#3803)
Deprecated in AngularFire 22, removed in AngularFire 23. Server-rendered apps should move to Firebase App Hosting.
- Affected: deploy targets with
ssr: trueorssr: 'cloud-functions'.ng deploynow prints a deprecation warning before the build, and theCF3v2andfunctionsRuntimeOptionsoptions are marked deprecated. - Not affected: hosting-only and Cloud Run deploys. They also no longer print the old "Legacy ng-deploy Firebase is deprecated" message.
Updating from a canary build
A canary build of 22 was saved as an exact version in your package.json, so it does not move on its own. Run:
ng update @angular/fire@next
What's Changed
Angular 22
- build!: require Angular 22 and compile with TypeScript 6. The screen-tracking service reads the routed component's selector through
reflectComponentType, sinceComponentFactoryResolveris gone from Angular 22. No change is visible to apps. by @armando-navarro, with @EthanSK as co-author, in #3801
Installing and upgrading
- build!:
firebaseis a peer dependency, andng update @angular/fire@nextruns a v22 migration that adds or aligns yourfirebaseentry. See "Breaking changes" above. by @armando-navarro in #3805 - build(schematics):
@angular/fireno longer installs@angular-devkit/schematics,@angular-devkit/coreor@schematics/angular, which the Angular CLI supplies when it runsng addandng update. A production install of a CLI app lists 112 packages instead of 136. If you run the schematics with the standaloneschematicscommand on pnpm withhoist=false, declare those three packages yourself. by @armando-navarro in #3808 - build: the npm package no longer ships the
docs/folder, which no code read. The package is 122 files instead of 175, and 1.2 MB instead of 2.0 MB compressed. The docs live on GitHub. by @armando-navarro in #3811
Firestore
- feat(firestore): Firestore pipeline operations are available from the new
@angular/fire/firestore/pipelinesand@angular/fire/firestore/lite/pipelinesentry points. Pipelines require a Firestore Enterprise edition database. by @KingDarBoja in #3799
Deploy
- feat(deploy): deprecate deploying server-side rendering to Cloud Functions. See "Deprecated" above. by @armando-navarro in #3803
Documentation
- docs: the AngularFire 22 upgrade guide,
docs/version-22-upgrade.md, is new. by @armando-navarro in #3805 - docs: the auth guide and the sample import
beforeAuthStateChangedfrom@angular/fire/auth, and the v21 upgrade guide names every AI symbol the Imagen removal took, not onlygetImagenModel. by @armando-navarro in #3817 - docs: the README and the Quickstart describe AngularFire 21 as released, not as a release candidate. by @armando-navarro in #3814
- docs(compat):
docs/compat.mdstates the compatibility API's support status: supported and kept working, bug fixes yes, new features in the modular API only, no planned removal. by @armando-navarro in #3810
Repository
- build: the repository's build and test targets use the
@angular/buildbuilders instead of the deprecated@angular-devkit/build-angularones. The published package is byte-identical. by @armando-navarro in #3807
Full Changelog: 21.0.0...22.0.0-rc.0