简体   繁体   English

我已经安装了firebase,错误依旧

[英]I already installed firebase and the error remains

src\firebaseConnection.js Line 17:17: 'initializeApp' is not defined no-undef src\firebaseConnection.js 第 17:17 行:“initializeApp”未定义 no-undef

Search for the keywords to learn more about each error.搜索关键字以了解有关每个错误的更多信息。

webpack compiled with 1 error and 1 warning enter image description here webpack 编译时出现 1 个错误和 1 个警告在此处输入图像描述

You should import like this:你应该像这样导入:

import { initializeApp } from "firebase/app";

const firebaseConfig = {...};

const app = initializeApp(firebaseConfig);

You may want to visit this documentation and learn how to use Firebase Services such as Firestore.您可能需要访问此文档并了解如何使用 Firebase 服务,例如 Firestore。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何删除 Firebase 中的此错误:“此域已在使用中。”? - How Do I Remove This Error in Firebase: "This domain is already in use."? 没有 Firebase 应用程序“[默认]”错误,但 firebase 已经初始化 - No Firebase App '[Default]' error but firebase is already initialized Google Cloud Functions Firebase 错误 默认的 Firebase 应用已经存在 - Google Cloud Functions Firebase Error The default Firebase app already exists 在这种情况下,我想处理 linkWithPopup 和 Firebase `auth/credential-already-in-use` 错误 - I want to handle linkWithPopup and Firebase `auth/credential-already-in-use` error in this case 错误:未启用顶级等待实验,但已安装加载程序 - Error: The top-level-await experiment is not enabled, but loader is already installed 我在我的 iOS 应用程序中安装了 Firebase Analytics,但它没有自动记录 - I have installed Firebase Analytics in my iOS app, but it is not logging automatically 如何检测用户是否已登录 Firebase? - How do I detect if a user is already logged in Firebase? 如何判断我的值是否已存在于 Firebase Firestore 中? - How can I tell if I value already exists in Firebase Firestore? Flutter Firebase:当用户尝试注册一个已经存在的 email 时出错 - Flutter Firebase: Error when user tries to register with an already existing email 我如何检查 email 是否已存在于身份验证 firebase 中 - how I can check if the email is already exist in authentication firebase
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM