nandorojo / swr-firestore

Implement Vercel's useSWR for querying Firestore in React/React Native/Expo apps. 👩‍🚒🔥
MIT License
777 stars 65 forks source link

TypeError: Cannot read property 'length' of undefined #128

Closed LucasEduardoGoncalves closed 3 years ago

LucasEduardoGoncalves commented 3 years ago

image

hold33n commented 3 years ago

Same error

hold33n commented 3 years ago

@LucasEduardoGoncalves @nandorojo I solved it by forking repo and replacing import * as firebase from 'firebase/app' to import firebase from 'firebase/app'

at /swr-firestore/src/classes/Fuego.ts

nandorojo commented 3 years ago

Solution is in the docs for firestore v8.

https://github.com/nandorojo/swr-firestore/issues/59#issuecomment-719950071

huy-lv commented 2 years ago

I got this error again on

"expo": "~46.0.7",
"@nandorojo/swr-firestore": "^0.16.0",
"firebase": "9.6.11",