【发布时间】:2021-12-20 16:06:52
【问题描述】:
Property 'auth' does not exist on type 'typeof import("/home/nuhutuh25/Desktop/ignition/registry/node_modules/firebase/app/dist/app/index")'.ts(2339)
我确实安装了 firebase 作为依赖项,还看到有人成功编写了const auth=app.auth(),但这也不起作用,因为类型 FirebaseApp 没有属性 auth。
我正在使用打字稿。
【问题讨论】:
-
本地安装firebase?什么?该项目是否包含 firebase 库?你在 package.json 中添加依赖了吗?
-
哦,对不起,我的意思是我跑了 yarn add firebase
标签: typescript firebase firebase-authentication