Reputation: 3926
Just started using AngularFire2 v5 seeing the following error about a dozen times when I run the app: Namespace 'firebase' has no exported member 'firestore' in the following .d.ts files:
node_modules/angularfire2/firebase.app.module.d.ts
node_modules/angularfire2/firestore/collection/changes.d.ts
node_modules/angularfire2/firestore/firestore.d.ts
node_modules/angularfire2/firestore/interfaces.d.ts
node_modules/angularfire2/firestore/observable/fromRef.d.ts
I'm on "angularfire2": "^5.0.0-rc.3".
Upvotes: 9
Views: 13746
Reputation: 547
Import firebase correctly as follows:
import firebase from 'firebase/app';
then try using something like:
firebase.firestore.OrderByDirection
Upvotes: 0
Reputation: 76
Also working with npm i --save firebase@latest
then you have latest version.
Upvotes: 1
Reputation: 572
I had the same issue. I was having firebase version 4.4.0 . Then i upgraded to 4.5.0
npm i --save firebase@^4.5.0
Now its working fine for me.
Upvotes: 6
Reputation: 8692
Double check your version of angularfire2
. It downgrades to RC0 if you do an npm update
, which I've noticed from their issue tracker is cause for a big amount of grief.
Upvotes: 1