我的问题是我的 IDE (WebStorm) 无法识别 Firebase 导入。它抛出以下错误:
Cannot resolve symbol getFirestore.
这是我的导入:
import { initializeApp, getApps } from "firebase/app";
import {
getAuth,
setPersistence,
browserSessionPersistence,
} from "firebase/auth";
import { getAnalytics } from "firebase/analytics";
import { getFirestore } from "firebase/firestore";
代码工作得非常好,但我希望有自动完成功能和没有任何错误的文件。
最佳答案
找到解决方案,需要在Webstorm中标记node_modules/@firebase才能包含...可能是“标记为不排除”
关于firebase - WebStorm 无法解析 Firebase 9 导入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69233662/