gpt4 book ai didi

angular - 通用类型 'Observer' 需要 2 个类型参数。 @firebase/app-types/private.d.ts

转载 作者:太空狗 更新时间:2023-10-29 19:32:55 26 4
gpt4 key购买 nike

我正在尝试创建一个将 angularfire2 用于 firebase 的应用程序。但是我收到以下错误:

typescript 错误通用类型“Observer”需要 2 个类型参数。...node_modules/@firebase/app-types/private.d.ts

  • 将服务名称转换为工厂名称以供使用。*/useAsService(应用程序:FirebaseApp,服务名称:字符串):字符串|空;

这是我的 package.json 文件....

{
"name": "MsgTest",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/animations": "5.2.10",
"@angular/common": "5.2.10",
"@angular/compiler": "5.2.10",
"@angular/compiler-cli": "5.2.10",
"@angular/core": "5.2.10",
"@angular/forms": "5.2.10",
"@angular/http": "5.2.10",
"@angular/platform-browser": "5.2.10",
"@angular/platform-browser-dynamic": "5.2.10",
"@firebase/app": "^0.3.1",
"@firebase/app-types": "^0.3.1",
"@firebase/auth-types": "^0.2.1",
"@firebase/database": "^0.2.2",
"@firebase/database-types": "^0.2.1",
"@firebase/firestore-types": "^0.3.0",
"@firebase/messaging-types": "^0.1.3",
"@firebase/storage-types": "^0.1.3",
"@ionic-native/core": "4.7.0",
"@ionic-native/splash-screen": "4.7.0",
"@ionic-native/status-bar": "4.7.0",
"@ionic/storage": "2.1.3",
"angular": "^1.6.10",
"angularfire2": "^5.0.0-rc.6.0",
"cordova": "^8.0.0",
"firebase": "^4.12.1",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"rxjs": "5.5.10",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@ionic/app-scripts": "3.1.9",
"typescript": "~2.6.2"
},
"description": "An Ionic project"
}

最佳答案

试试这个,

npm 安装 angularfire2@5.0.0-rc.6.0 --保存

npm 安装 firebase@4.12.1

关于angular - 通用类型 'Observer<V, E>' 需要 2 个类型参数。 @firebase/app-types/private.d.ts,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50302820/

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