Issue
When I upgrade from firebase
v7.14.3 to v7.15.1 I get the following build error / typescript error:
TS2339: Property 'firestore' does not exist on type 'FirebaseNamespace'.
I import and use Firestore as following:
import {firebase} from '@firebase/app';
import '@firebase/firestore';
const firestore: firebase.firestore.Firestore = firebase.firestore();
=> firebase.firestore()
is my issue.
I have probably missed the CHANGELOG, any help on how to migrate this appreciated!
Solution
I have always imported Firebase client SDKs in TypeScript like this:
npm install firebase
import * as firebase from 'firebase/app'
import 'firebase/firestore'
const firestore = firebase.firestore()
Answered By - Doug Stevenson
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.