Angular 找不到命名空间';firebase';安圭拉5号项目
我试图将angularfire2和firebase集成到Angular5项目中,但它给出了“firebase”名称空间错误 package.json 我尝试了以下解决方案,但没有一个能解决我的问题Angular 找不到命名空间';firebase';安圭拉5号项目,angular,firebase,angularfire2,tsconfig,Angular,Firebase,Angularfire2,Tsconfig,我试图将angularfire2和firebase集成到Angular5项目中,但它给出了“firebase”名称空间错误 package.json 我尝试了以下解决方案,但没有一个能解决我的问题 将*作为firebase从app.module.ts中的“firebase”导入 tsconfig.json中的“类型”:[“firebase”] 使用“npm安装--保存@types/firebase”安装@types/firebase 在所有这些之后,我已经用“typings install
- 将*作为firebase从app.module.ts中的“firebase”导入李>
- tsconfig.json中的“类型”:[“firebase”]
- 使用“npm安装--保存@types/firebase”安装@types/firebase
您的问题已发布在此处: 因此,在firebase发布新版本时,您应该继续使用旧版本的
firebase
npm uninstall --save firebase
npm install --save firebase@4.8.0
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
],
"types": [
"firebase"
]
},
"files": [
"typings/index.d.ts"
]
}
npm uninstall --save firebase
npm install --save firebase@4.8.0