Closed timucincicek closed 1 year ago
This issue does not seem to follow the issue template. Make sure you provide all the required information.
I solved the problem with a downgrade of the 2 packages.
"firebase": "~9.9.2",
"@angular/fire": "~7.4.1"
I have the same problem with fire 7.5.0 and firebase 9.17.0 Downgrade firebase to 9.16.0 works fine. Waiting for solution
I am also facing the same issue
My team is also facing this issue, with complications downgrading because our angular app uses --legacy-peer-deps
so we're spending the day today unwinding dependencies and trying to override where necessary... Really disappointed this happened with properly version dependencies.
Also facing this. Solved by downgrading to 7.4.1.
Feels like this upstream PR might be the culprit, fix incoming.
I think that I found the problem:
Package "firebase": 9.17.0 won't work Package "firebase": 9.16.0 is working
This is my package.json file:
{
"name": "test",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "^15.1.0",
"@angular/cdk": "^15.1.3",
"@angular/common": "^15.1.0",
"@angular/compiler": "^15.1.0",
"@angular/core": "^15.1.0",
"@angular/fire": "^7.5.0",
"@angular/forms": "^15.1.0",
"@angular/material": "^15.1.3",
"@angular/platform-browser": "^15.1.0",
"@angular/platform-browser-dynamic": "^15.1.0",
"@angular/router": "^15.1.0",
"@angular/service-worker": "^15.1.0",
"firebase": "~9.16.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.1.3",
"@angular/cli": "~15.1.3",
"@angular/compiler-cli": "^15.1.0",
"@types/jasmine": "~4.3.0",
"jasmine-core": "~4.5.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.9.4"
}
}
You can easily recreate the error simply by changing "firebase": "~9.16.0", to "firebase": "~9.17.0", then delete the package-lock.json file and run "npm install"
NOTE: Be aware that if you just install @angular/fire, it will install below the latest firebase package, but you can work around this, simply by adding a specific version of firebase@9.16.0
Conclusion: is a problem with firebase@9.17.0 package
I have the same issue. The angular/fire version is 7.5.0 and firebase version 9.17.0.
If I downgrade to firebase 9.16.0, works fine.
I am also facing the same issue. Even downgrading is not working for me :worried:
When you change the firebase version, check the next steps:
From: "firebase": "^9.16.0",
To: "firebase": "9.16.0",
You can see that i delete the '^' simbol too.
Is not working for me, I'm still getting that error :/
If you change your package.json file, you have to put ~9.16.0 why? Read this https://docs.npmjs.com/about-semantic-versioning#using-semantic-versioning-to-specify-update-types-your-package-can-accept
Also you need to delete the "package-lock.json" file and the "node_modules" folder. And then finally run "npm install"
I was a noob xD. I used yarn install
but only deleted the package-lock.json
and not the yarn.lock
😐.
Now it works, thanks! 😃
Fixed with the release of firebase
version 9.17.1
. They also update the release notes of 9.17.0
to notify people of the bug it contains. This ticket can be closed AFAIK!
new to this... can someone please tell me how to downgrade in vs npm?
nevermind figured it out thank you
my issue was
Fixed with the release of
firebase
version9.17.1
. They also update the release notes of9.17.0
to notify people of the bug it contains. This ticket can be closed AFAIK!
My issue was resolved with update. I am now using 7.5.0 and the errors are gone
When can we expect a fix of this in the official npm package of @angular/fire? It's still in 7.5.0.
The issue happens because of an incorrect version of firebase
, not @angular/fire
. Make sure to install version 9.17.1
of firebase
(you can check which version you have installed by running npm list firebase
or yarn list firebase
).
Im my case I was importing from wrong path:
Wrong import: import { Messaging, onMessage, getToken } from '@angular/fire/messaging/firebase';
This is correct: import { Messaging, onMessage, getToken } from '@angular/fire/messaging';
I've been using AngularCrashlytics(from @angular/fire) for a while interestingly since this morning I became unable to get either build or ng serve which throws error as below.Can someone help me to get rid of this?
On the app.module I've already added @angular/fire releated configuration steps as below(taken from https://github.com/angular/angularfire/blob/master/docs/analytics/getting-started.md)
I have configuration mentioned as below
Dependency versions from package.json
Additional Note : Already cloned project from scratch many times have tried deleting node modules folder and npm install besides tried to upgrade both firebase and @angular/fire to the latest versions which didn't fix the issue.
See the stacloverflow ticket: https://stackoverflow.com/questions/75335661/angular-fire-throws-error-module-not-found-error-default-condition-should-be