Namespace 'firebase' has no exported member 'firestore'
Asked Answered
K

4

9

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".

Keloid answered 6/11, 2017 at 10:24 Comment(2)
They are working on it: github.com/angular/angularfire2/issues/1324 Hopefully it will be solved soon.Cobaltous
That shouldn't cause the above problems. We're using NG5 and AF5 together just fine.Soutine
W
6

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.

Werbel answered 13/2, 2018 at 6:3 Comment(1)
Told you na.. ;)Werbel
S
1

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.

Soutine answered 8/11, 2017 at 18:51 Comment(0)
H
1

Also working with npm i --save firebase@latest then you have latest version.

Huntress answered 18/5, 2018 at 9:32 Comment(0)
C
0

Import firebase correctly as follows:

import firebase from 'firebase/app';

then try using something like:

firebase.firestore.OrderByDirection

Cram answered 13/8, 2022 at 8:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.