firebase.firestore() is not a function when trying to initialize Cloud Firestore

前端 未结 21 1542
独厮守ぢ
独厮守ぢ 2020-12-01 02:45

When I try to initialize Firebase Cloud Firestore, I ran into the following error:

Uncaught TypeError: WEBPACK_IMPORTED_MODULE_0_firebase

21条回答
  •  悲&欢浪女
    2020-12-01 03:15

    To use firestore you need to add this link at the top of your html page.

    //After initializing firebase, in your main javascript page call...
    var data = firebase.firestore();
    
    

提交回复
热议问题