EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

Property 'firestore' does not exist on type 'typeof firebase'. #1804

Closed 16hitjon closed 3 years ago

16hitjon commented 3 years ago

I use NS7 with Angular and my import looks like this : _import { firebase } from "@nativescript/firebase";_ firestore.init(...) works with no errors but when I try to access the firebase.firestore() like here: const citiesCollection = firebase.firestore().collection("cities"); I get the error "Property 'firestore' does not exist on type 'typeof firebase'."
How should I import it instead? I tried something like import { firestore} from "@nativescript/firebase/firestore" but that doesn`t do it eighter. Have I overlooked something in the Docs?

wiliamtaesunglee commented 2 years ago

how did u solved?

16hitjon commented 2 years ago

I had multiple versions of the firestore-plugin installed (one for NS7 and an older one), when building the project you see which version is used. I solved it by reinstalling everything the right way