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

前端 未结 5 1199
别那么骄傲
别那么骄傲 2021-02-18 20:27

When I run npm run start I get the below error regarding firebase.

Tech: Angular version 9, Firebase, Firestore, Geofirestore Angular CLI.

5条回答
  •  时光说笑
    2021-02-18 20:59

    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.

提交回复
热议问题