通用类型&#39; Observer <v,e =“”>&#39;需要2个类型的参数。 @火力/应用类型/ private.d.ts

时间:2018-05-12 04:23:17

标签: angular ionic-framework angularfire2

我正在尝试创建一个使用angularfire2作为firebase的应用。但我收到以下错误:

打字稿错误 通用类型&#39; Observer&#39;需要2个类型的参数。 ... node_modules/@firebase/app-types/private.d.ts

  • 将服务名称转换为要使用的工厂名称。 * / useAsService(app:FirebaseApp,serviceName:string):string |空;

这是我的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"
}

1 个答案:

答案 0 :(得分:0)

试试这个,

npm install angularfire2@5.0.0-rc.6.0 --save

npm install firebase@4.12.1