In brand new Angular 9 project issue:
ng add @angular/fire
This doesn't install firebase package. Due to this npm start fails until I manually installed this package.
Angular version 9.1.1
I have the same problem, but manual installing angular/fire does not help.
With the latest Node.JS and Angular versions
I have de same problem, the firebase package does not install with "ng add @angular/fire" and "npm install firebase" failed
I have no problems when going back to Angular 8
I resolved this, run "npm install firebase" into the @angular/fire folder
I resolved this, run "npm install firebase" into the @angular/fire folder
after installing this, my application is running but I'm getting this error in the console
ERROR NullInjectorError: R3InjectorError(AppModule)[AngularFirestore -> InjectionToken angularfire2.app.options -> InjectionToken angularfire2.app.options -> InjectionToken angularfire2.app.options]:
NullInjectorError: No provider for InjectionToken angularfire2.app.options!
I m not using angularfire2, i usin the lastest and i dont have this error,
try uninstall fireangular2, install @angular/fire and then install firebase
into fire folder
El dom., 19 abr. 2020 6:53, Mohit Ande notifications@github.com escribió:
I resolved this, run "npm install firebase" into the @angular/fire folder
after installing this, my application is running but I'm getting this
error in the consoleERROR NullInjectorError: R3InjectorError(AppModule)[AngularFirestore -> InjectionToken angularfire2.app.options -> InjectionToken angularfire2.app.options -> InjectionToken angularfire2.app.options]:
NullInjectorError: No provider for InjectionToken angularfire2.app.options!—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/angular/angularfire/issues/2401#issuecomment-616090828,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APGNO25WW7MC6PHIZ3CIFYTRNLC2TANCNFSM4MG2EPTA
.
Maybe the startup instructions need to be modified to the following?
ng add @angular/fire@next
npm install firebase @angular/fire --save
It would be great to only include the parts of firebase that is actually depended upon. Personally, I'm using only the Analytics and Performance bits, and I'm hoping I can include something like this, rather than the entire firebase dependency:
"dependencies": {
....
"@angular/fire": "^6.0.0",
"@firebase/app": "^0.6.5",
"@firebase/analytics": "^0.3.6",
"@firebase/performance": "^0.3.6",
....
},
Addressed in a recent fix.
Most helpful comment
I resolved this, run "npm install firebase" into the @angular/fire folder