tylermcginnis / re-base

:fire: A Relay inspired library for building React.js + Firebase applications. :fire:
2.13k stars 143 forks source link

Firestore (5.0.3) | Cannot read property 'CollectionReference' of undefined #255

Closed iPekka closed 6 years ago

iPekka commented 6 years ago

Hi, I'm trying to use re-base for the first time but I'm facing an error when trying to use whatever method from base. I'm using Firestore...

It says Cannot read property 'CollectionReference' of undefined

@_validateCollectionPath (in bundle.js) var CollectionReference = _app2.default.firestore.CollectionReference;

I'm using

My base.js file `import firebase from 'firebase/app' import 'firebase/firestore' import Rebase from 're-base'

const config = { // [...] }

const app = firebase.initializeApp(config) const db = firebase.firestore(app) const settings = { timestampsInSnapshots: true } db.settings(settings) const base = Rebase.createClass(db)

export { base }`

What am I missing ? Please help !!

qwales1 commented 6 years ago

@iPekka I am guessing that its a change in firebase v5 that is causing the issue. try downgrading to firebase 4.13.1 .

Rekenna commented 6 years ago

@iPekka I just confirmed that this is the issue. I was running into this as well today and downgrading to 4.13.1 works for now.

iPekka commented 6 years ago

Hi. After downgrading that works for me as well. Thank you guys.

ghost commented 6 years ago

When is re-base going to release a version to support firebase 5+?

pablohpsilva commented 6 years ago

Guys, when will you support the newest version?

P.S.: I'm loving re-base