firebase.auth is not a function

前端 未结 18 962
孤城傲影
孤城傲影 2020-11-28 10:30

I am using Webpack with firebase and firebase-admin.

To install firebase I ran

npm install --save firebase

I am importing firebase

18条回答
  •  迷失自我
    2020-11-28 10:47

    You just need to use the import as following

    import firebase from "firebase/app";
    import "firebase/firestore";
    import "firebase/auth";
    

    in the above case, both auth and DB services are being used. For any other service, you need to import like that only.

提交回复
热议问题