Geoff
Geoff

Reputation: 6629

Angular2 fire fails Namespace 'firebase' has no exported member 'Promise'

I have installed angular2 fire

 "angularfire2": "^5.0.0-rc.0",

Now in my app module(root module)

export const firebaseConfig = {
  apiKey: "mykey",
  authDomain: "....",
  databaseURL: "...",
  projectId: "...",
  storageBucket: "...",
  messagingSenderId: "..."
};

imports:[
    AngularFireModule.initializeApp(firebaseConfig), 
    AngularFireDatabaseModule
 ]

Now am geting an error

 Class 'FirebaseApp' incorrectly implements interface 'App'.
  Property 'firestore' is missing in type 'FirebaseApp'.


node_modules/angularfire2/firebase.app.module.d.ts (12,28):
  Namespace 'firebase' has no exported member 'Promise'.

Where am i going wrong or what else do i need to add to have it work

Upvotes: 3

Views: 2044

Answers (2)

VOSTER TEMBA
VOSTER TEMBA

Reputation: 9

run npm install anularfire2 --save command it should work

Upvotes: 0

Siya Mzam
Siya Mzam

Reputation: 4705

firebase.Promise was removed in Firebase 4.5.0. "angularfire2": "^5.0.0-rc.2" accounts for this change. This version should solve the issue you're having.

Upvotes: 2

Related Questions