Install angular firebase error : Property ‘automaticDataCollectionEnabled’ is missing in type ‘FirebaseApp’

  • A+
Category:Web

We installed angular firebase with

npm install firebase angularfire2 --save 

And this error occured

ERROR in node_modules/angularfire2/firebase.app.module.d.ts(10,22): error TS2420: Class 'FirebaseApp' incorrectly implements interface 'FirebaseApp'. Property 'automaticDataCollectionEnabled' is missing in type 'FirebaseApp'.

How can I solved it?


This work for me. Edit firebase.app.module.d.ts file


export declare class FirebaseApp implements FBApp {
name: string;
options: {};
automaticDataCollectionEnabled: boolean; // this is the missing line
auth: () => FirebaseAuth;
database: () => FirebaseDatabase;
messaging: () => FirebaseMessaging;
storage: () => FirebaseStorage;
delete: () => Promise<any>;
firestore: () => FirebaseFirestore;
}

also add @firebase/app

npm i -S @firebase/app 

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: