Home > Back-end >  Angular 7 version compatibility with firebase
Angular 7 version compatibility with firebase

Time:05-18

So, I am working at this project for my faculty where I have to build an Angular 7 app and upload it on a cloud provider. I have chosen Firebase to do that.

At the moment I am running Angular 7.2.0 with node 10.9.0, which is fine. The firebase version I am using is 8.2.0, with firebase-tools 8.20.0 and @angular/fire 5.4.2(which is the last version of @angular/fire that supports Angular 7). When it comes to using firebase (e.g. I tried implementing Google Authentication), I get errors of properties or functions missing from the firebase package and I am pretty sure they're not syntax errors, because I tried multiple ways(just to make sure). And yes, firebase is configured properly, because I managed to retrieve and print on frontend some objects in the database.

I believe the problem stands in version compatibility. Are my firebase and firebase-tools versions too hight? How can I find out which versions of my packages are compatible with my Angular version?

Here are my dependencies from package.json:

"@angular/core": "~7.2.0",
"@angular/fire": "^5.4.2",
"firebase": "^8.2.0",
"firebase-tools": "^8.20.0",

Many thanks in advance, this issue stopped my progress for a few days now.

CodePudding user response:

In a production project, I am using these two dependencies and they are working fine together, for the firebase tools, you can check it's npm page version compatibility but I think the version 8.20.0 is compatible with firebase 8.6.7.

       "@angular/fire": "^6.1.5",
       "firebase": "^8.6.7",

PS: If you are willing to use the version 9.x of firebase, the configurations are different between this version and the version 8.x

CodePudding user response:

Finally, I managed to find a good pick of versions for my dependencies, so:

"@angular/core": "~7.2.0"
"@angular/fire": "^5.4.2"
"firebase": "^7.7.0"
"firebase-tools": "^7.13.1"
and node 10.9.0

For anyone who bumps in a similar situation, check the versions and their release dates on https://npmjs.com/ (I just had to find versions of firebase and firebase-tools that were released before my @angular/[email protected] was released).

  • Related