angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Initial setup ng add @angular/fire

Open agroupp opened this issue 6 years ago • 11 comments

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

agroupp avatar Apr 13 '20 08:04 agroupp

I have the same problem, but manual installing angular/fire does not help. With the latest Node.JS and Angular versions

vanarebane avatar Apr 14 '20 07:04 vanarebane

I have de same problem, the firebase package does not install with "ng add @angular/fire" and "npm install firebase" failed

igmazzini avatar Apr 16 '20 18:04 igmazzini

I have no problems when going back to Angular 8

vanarebane avatar Apr 16 '20 18:04 vanarebane

I resolved this, run "npm install firebase" into the @angular/fire folder

igmazzini avatar Apr 16 '20 19:04 igmazzini

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!
 

andemohit avatar Apr 19 '20 09:04 andemohit

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 [email protected] 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 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!

— 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 .

igmazzini avatar Apr 19 '20 12:04 igmazzini

Maybe the startup instructions need to be modified to the following?

ng add @angular/fire@next
npm install firebase @angular/fire --save

mchirico avatar May 03 '20 14:05 mchirico

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",   
     ....
},

daviddphillips avatar Jun 16 '20 19:06 daviddphillips

Addressed in a recent fix.

jamesdaniels avatar Nov 18 '20 19:11 jamesdaniels

I ran the command ng add @angular/fire@next Kept waiting... fell asleep woke up the next morning still installing... image

bloodred17 avatar Aug 21 '21 03:08 bloodred17

@bloodred17 I have the same problem

me-tantaroth avatar Jan 30 '22 01:01 me-tantaroth