我正在尝试进行数据库调用/post,但收到错误 functions.js:7 Uncaught ReferenceError: firebase is not defined 根据我的研究,我的理解是'firebase‘是在firebase.js脚本文件中定义的,该脚本文件是使用Firebase设置面板中的CDN代码导入的。但我找到的所有帮助页面都是2014-2017年的,Firebase的版本9使用了完全不同的导入语言。这些书页对我没有帮助。 我使用的是标准 import { initializeApp } from "https://www.gstatic.com/fir
我正在为我的应用程序的后端部分使用firebase。我的代码是这样的:
<script type="module">
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.6.1/firebase-app.js";
// TODO: Add SDKs for Firebase products that you
我已经开始尝试使用,但是我似乎无法在没有缺少文件的情况下运行它:
Android Bundling failed 597ms
While trying to resolve module `firebase` from file `C:\Users\wootk\Documents\GitHub\React-and-rNative\React Native\React Native, Firebase v9, authen
tication and firestore\FirebaseAuthApp\firebase\firebaseConfig.js`, the package `C
在React应用程序中,我通常这样初始化firebase: if (firebase.apps.length < 1) {
firebase.initializeApp(firebaseConfig);
// Initialize other firebase products here
} 在我升级到v9测试版之前,它工作得很好。我如何让它在新版本中工作?
我试图转移到firebase版本9,并且我更新了我的所有导入而不改变代码,现在当我尝试做我的google登录时,我继续得到它。
TypeError: Cannot read properties of undefined (reading 'GoogleAuthProvider')
这是我有问题的代码
import firebase from "firebase/compat/app";
const provider = new firebase.auth.GoogleAuthProvider();
// Import the functions you