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

  • A+

We installed angular firebase with

npm install firebase angularfire2 --save 

And this error occured

ERROR in node_modules/angularfire2/,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 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 


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