Firebase and AnglularFire2


#1

[17:03:21] typescript: C:/Users/anant/chat/node_modules/angularfire2/firebase.app.module.d.ts, line: 8
Class ‘FirebaseApp’ incorrectly implements interface ‘FirebaseApp’. Property
‘automaticDataCollectionEnabled’ is missing in type ‘FirebaseApp’.

   L7:  import { FirebaseFirestore } from '@firebase/firestore-types';
   L8:  export declare class FirebaseApp implements _FirebaseApp {
   L9:      name: string;

package.json file

{
  "name": "chat",
  "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.9",
    "@angular/common": "5.2.9",
    "@angular/compiler": "5.2.9",
    "@angular/compiler-cli": "5.2.9",
    "@angular/core": "5.2.9",
    "@angular/forms": "5.2.9",
    "@angular/http": "5.2.9",
    "@angular/platform-browser": "5.2.9",
    "@angular/platform-browser-dynamic": "5.2.9",
    "@firebase/app": "^0.1.10",
    "@ionic-native/core": "4.6.0",
    "@ionic-native/google-plus": "^4.7.0",
    "@ionic-native/splash-screen": "4.6.0",
    "@ionic-native/status-bar": "4.6.0",
    "@ionic/storage": "2.1.3",
    "angularfire2": "^5.0.0-rc.7.0-next",
    "cordova-android": "7.0.0",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-googleplus": "^5.3.0",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^1.2.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "firebase": "^4.13.1",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "rxjs": "5.5.8",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@firebase/app-types": "^0.2.0",
    "@firebase/auth-types": "^0.2.1",
    "@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/app-scripts": "3.1.8",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-googleplus": {
        "REVERSED_CLIENT_ID": "com.googleusercontent.apps.529165664602-tpl6g40utvsr1bot8ofimkcmdl0tll3k"
      },
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {}
    },
    "platforms": [
      "android"
    ]
  }
}


#2

There was something goofy going on with recent versions of AF2 and Firebase. I had to install FirebaseApp manually to get everything to work. But I know it was supposed to be fixed soon. I think you should read the Github issues for AF2, there might be more details there.


#3

I installed a different version of angularfire2 and it solved the problem