gpt4 book ai didi

angular - 属性 'performance' 在类型 'FirebaseApp' 中缺失,但在类型 'App' 中是必需的

转载 作者:太空狗 更新时间:2023-10-29 18:09:22 24 4
gpt4 key购买 nike

当我尝试运行全新安装的 Angular 7.2 和 Firebase 时,我似乎遇到了这个错误:

ERROR in node_modules/@angular/fire/firebase.app.module.d.ts(17,22): error TS2420: Class 'FirebaseApp' incorrectly implements interface 'App'.
Property 'performance' is missing in type 'FirebaseApp' but required in type 'App'.

尝试在@angular/fire 和 firebase 的不同版本之间切换,但未能找到有效的组合。

当前的 package.json :

{
"name": "my-app",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"compile:server": "webpack --config webpack.server.config.js --progress --colors",
"serve:ssr": "node dist/server",
"build:ssr": "npm run build:client-and-server-bundles && npm run compile:server",
"build:client-and-server-bundles": "ng build --prod && ng run supynes-full:server:production"
},
"private": true,
"dependencies": {
"@angular/animations": "~7.2.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/http": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/platform-server": "~7.2.0",
"@angular/router": "~7.2.0",
"@nguniversal/express-engine": "^7.1.1",
"@nguniversal/module-map-ngfactory-loader": "^7.0.2",
"core-js": "^2.5.7",
"dynamic-import-ponyfill": "^0.1.0",
"firebase": "^5.3.1",
"flamelink": "^0.19.6",
"node-fetch": "^2.2.0",
"rxjs": "^6.2.2",
"tslib": "^1.9.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.0",
"@angular/cli": "~7.3.5",
"@angular/compiler-cli": "~7.2.0",
"@angular/language-service": "~7.2.0",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-loader": "^5.2.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.2.2",
"webpack-cli": "^3.1.0"
}
}

有人遇到过这个错误吗?谷歌似乎没有找到任何与性能属性相关的东西,只有类似的错误,而不是相同的错误。有什么想法吗?

最佳答案

我也遇到了这个错误。好像是最新版firebase5.11.0 已损坏。

将我的依赖项更改为 5.10.0 解决了这个问题。

重要提示:不要使用任何 ~^ 版本。前缀

关于angular - 属性 'performance' 在类型 'FirebaseApp' 中缺失,但在类型 'App' 中是必需的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55933656/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com