AngularFirebase/102-angular-elements-firebase

error on clean install: Property 'automaticDataCollectionEnabled' is missing in type 'FirebaseApp'

AustinHatem opened this issue · 2 comments

ERROR in node_modules/angularfire2/firebase.app.module.d.ts(10,22): error TS2720: Class 'FirebaseApp' incorrectly implements class 'FirebaseApp'. Did you mean to extend 'FirebaseApp' and inherit its members as a subclass?
Property 'automaticDataCollectionEnabled' is missing in type 'FirebaseApp'.

I get this error when i clone and run. I can fix this by installing: "@firebase/app": "^0.1.10". This has to do with the latest version of firestore I guess.

Workaround: add "automaticDataCollectionEnabled: boolean;" to the "angularfire2 firebase.app.module.d.ts" file FirebaseApp class.

`export declare class FirebaseApp implements FBApp {
name: string;
automaticDataCollectionEnabled: boolean;
options: {};
auth: () => FirebaseAuth;
database: () => FirebaseDatabase;
messaging: () => FirebaseMessaging;
storage: () => FirebaseStorage;
delete: () => Promise;
firestore: () => FirebaseFirestore;

}`

See Issue 1574

@ebduhon Alternatively, update AngularFire2 to the latest version which should fix this issue.