Angular9: ERROR in The target entry-point "@angular/fire/auth" has missing dependencies

Had the same problem. Compared my package.json with a different project of mine that worked just the other day.

I found that the firebase package was not there. So I just copied it in,

"firebase": "^7.13.2",

ran

npm install

and it seems to work:

package.json:

"dependencies": {
    "@angular/animations": "~9.1.0",
    "@angular/cdk": "^9.2.0",
    "@angular/common": "~9.1.0",
    "@angular/compiler": "~9.1.0",
    "@angular/core": "~9.1.0",
    "@angular/fire": "^6.0.0",
    "@angular/forms": "~9.1.0",
    "@angular/material": "^9.2.0",
    "@angular/platform-browser": "~9.1.0",
    "@angular/platform-browser-dynamic": "~9.1.0",
    "@angular/router": "~9.1.0",
    "firebase": "^7.13.2",
    "rxjs": "~6.5.4",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2"
  },

Now I see you have an older version, maybe updating that will solve the problem?


TL;DR
You need two packages (@angular/fire & firebase) to properly run your app and then to use firebase/firestore.
Install them using ng add @angular/fire & npm install firebase

Explanation:

I was getting this error when I served my app.

ERROR in The target entry-point "@angular/fire" has missing dependencies:
 - firebase/app

Reason behind this error: A proper firebase angular setup needs two packages @angular/fire & firebase. I only had one of them installed using ng add @angular/fire. In order to successfully run my project, I had to install the firebase package using npm install firebase & it worked after this.


Just update/install Firebase in your project (locally, not globally). Using the terminal go to the project folder and execute:

npm install firebase@latest

Current versions of npm uses --save flag as default, so it will change package.json automatically.