Angularfire 21 release?
It's been over 2 months now when angular 21 was released but angular fire is still at the 20.. and it is the only thing stopping us from upgrading our projects to 21, and the RC version has too much incompatibilities.
We need a next stabled Angular/fire compatible for version 21 and are waiting long time like a fox waiting for spring in the cold winter.
So... What's up with the v21 RC? Like OP stated, it's been 2 months since 21 dropped, do we have any activity at all?
Is there no way to get fire v.20 working with angular 21?
Latest @angular/fire (not 21 RC) works fine for me with Angular 21. You can put this into your package.json to prevent errors during install:
"overrides": {
"@angular/fire": {
"@angular/common": "$@angular/common",
"@angular/core": "$@angular/core",
"@angular/platform-browser": "$@angular/platform-browser",
"@angular/platform-browser-dynamic": "$@angular/platform-browser-dynamic"
}
}
@DDeenis what does that solution actually do? I mean, am I going to end up with multiple versions of the packages in my project?
@jpelton-stroud it is telling @angular/fire to use your current Angular packages versions instead of what's defined in @angular/fire's package.json. Otherwise, you will get errors during npm install, since the latest @angular/fire expects Angular 20. You don't need to install another version @angular/fire.
Note that it is just a temporary workaround until the @angular/fire team releases a proper update. It works fine for me, but I can't guarantee that you won't encounter any issues, so it's up for you to test and decide.
Installing it with --legacy-peer-deps may work, depending on your project. For me it worked together with the 21.rc0 "beta" of @angular/fire, but it does have some issues. Its definately not ready for production. The same would be true for using overrides. There's another thread at https://github.com/angular/angularfire/issues/3678
I am hitting the problem that applications (in the age of AI) need to be updated more often than before, and this is becoming a problem with packages that don't update often enough. For my situation, the lack of communication also doesn't help, so am looking at alternatives to angular/fire and even firebase itself. There may be no choice but to move to Supabase for authentication, database and storage. Their update cycle is much more frequent.
Waiting also for version 21. It's frustrating especially angular and firebase constantly updating this project needs to be updated too. Then Ang 22 will be release we will have to wait another 3 months?
you could vote here https://firebase.uservoice.com/forums/948424-general/suggestions/47440403-make-angularfire-an-offcially-supported-library
you could vote here https://firebase.uservoice.com/forums/948424-general/suggestions/47440403-make-angularfire-an-offcially-supported-library
Thank you for the link. I wasn't aware the vote existed, it helped me decide to move to Supabase. The vote is 2 years old and nothing is being done with it. Who knows how long it's going to take :) AngularFire is a great library though, just not suitable for production and quick iteration.
There is a version mismatch in the RC artifact:
└─┬ @angular/[email protected]
├── [email protected]
└─┬ [email protected]
└── [email protected]
Which leads to a problem using OAuth and OIDC because the instanceof checks fail.
My current fix:
"overrides": {
"firebase": "12.8.0",
"rxfire": {
"firebase": "12.8.0"
}
But I think a new version of rxfire is needed to provide a new version of angular/fire.
I did what @DDeenis did, but I had to add @angular/platform-server to the mix
"overrides": {
"@angular/fire": {
"@angular/common": "$@angular/common",
"@angular/core": "$@angular/core",
"@angular/platform-browser": "$@angular/platform-browser",
"@angular/platform-browser-dynamic": "$@angular/platform-browser-dynamic",
"@angular/platform-server": "$@angular/platform-server"
}
},
Still not a 21? That blocks the migration guys, it's serious.
Still not a 21? That blocks the migration guys, it's serious.
Best migration is to drop angular fire entirely.
@IsmaelBembo That is my next consideration. Not even sure anymore what is really the advantage of using this lib.
@JGSolutions I don't think there is an advantage anymore, or if there was any to begin with. It was just a commodity i guess, but seeing how the development has been absolutely stuck for ages it makes no sense to continue using it, much less add it to new projects.
So what alternative do you propose, still to use firebase api in an angular project? Direct calls with http will be a bit clunky.
So what alternative do you propose, still to use firebase api in an angular project? Direct calls with http will be a bit clunky.
@obewan Just use the core Firebase SDK for JS https://www.npmjs.com/package/firebase. As far as I know you can accomplish the same with little changes in code, Angularfire is just a wrapper over this thing.
The main issue is that rxfire needs to be updated before this package can be updated.
I forked the https://[email protected]/KingDarBoja/rxfire branch and created a dist version that you can plug directly into npm. It's been working, I've used it for about a month or two in production. You can use it like this:
package.json
"dependencies": {
"@angular/fire": "21.0.0-rc.0-canary.ac3dd7c",
"rxfire": "git+https://[email protected]/dereekb/rxfire#606da27059f8fce2563d6e5a79ec4c7d0843a942",
},
"overrides": {
"@angular/fire": {
"rxfire": "git+https://[email protected]/dereekb/rxfire#606da27059f8fce2563d6e5a79ec4c7d0843a942",
"firebase-tools": "15.11.0"
}
}
I'm not able to go full zoneless in my projects yet, so I'll be relying on rxfire/angular fire for the time being.
Duplicate of https://github.com/angular/angularfire/issues/3678. There is helpful guidance there for migrating to the JS SDK for Firebase.