3
votes

I am trying to create an app that uses angularfire2 for firebase. But I am getting the following error:

Typescript Error Generic type 'Observer' requires 2 type argument(s). ...node_modules/@firebase/app-types/private.d.ts

  • Convert service name to factory name to use. */ useAsService(app: FirebaseApp, serviceName: string): string | null;

Here is my package.json file....

{
  "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
Facing the same issue. Have you found a solution yet? - Vivek Sinha
No, I don't have a solution yet. - Adam
Same issue here after updating to the @latest. Have you found a solution? - Paul Strupeikis
Updating to 5.0.3 solved the issue for me. - Paul Strupeikis
npm i @firebase/util solved the issue for me - user1005016

1 Answers