I am getting a TypeScript error compiling [email protected] with [email protected], using Angular 5.0.1. A very similar error also pops up when I tried TS 2.5.3.
ERROR in node_modules/angularfire2/firebase.app.module.d.ts(5,22): error TS2420: Class 'FirebaseApp' incorrectly implements interface 'App'.
Property 'firestore' is missing in type 'FirebaseApp'.
node_modules/angularfire2/firebase.app.module.d.ts(12,28): error TS2694: Namespace 'firebase' has no exported member 'Promise'.
I jerry-patched firebase.app.module.d.ts to work:
export declare class FirebaseApp implements firebase.app.App {
name: string;
options: {};
auth: () => firebase.auth.Auth;
database: () => firebase.database.Database;
messaging: () => firebase.messaging.Messaging;
storage: () => firebase.storage.Storage;
delete: () => Promise<any>;
firestore(): firebase.firestore.Firestore;
}
Hey @colinskow! You need to make sure you're on AngularFire 5.0.0-rc.3 and Firebase ^4.6.0. That should resolve it!
@davideast thanks for the response. I had the dependency set to "angularfire2": "^5.0.0-rc.3". Apparently yarn was installing RC.0-next. Using an exact version 5.0.0-rc.3 resolved the issue.
hi, i m currently using angularfire2 : ^4.0.0-rc.2 and it gives me the same error, which version should I use for the firebase. I have to use angularfire2 : ^4.0.0-rc.2 this version only...
thanx...
Most helpful comment
I jerry-patched
firebase.app.module.d.tsto work: