firebase / geofire-js

GeoFire for JavaScript - Realtime location queries with Firebase
MIT License
1.44k stars 345 forks source link

Firebase 6.x.x incompatibility and firebase vs firebase-admin clash. #186

Open ReverseControl opened 5 years ago

ReverseControl commented 5 years ago

Feature request: can we please get a geofire version compatible with firebase 6.x.x?

Version info

UNMET PEER DEPENDENCY firebase@6.6.0 ├── firebase-admin@8.5.0 ├── firebase-auth@0.1.2 ├── firebase-functions@3.2.0 ├── firebase-tools@7.3.1 ├── geofire@5.0.1 ├── object-hash@1.3.1 ├── tslint@5.8.0 ├── typescript@2.8.4

npm ERR! peer dep missing: firebase@^2.4.0 || 3.x.x || 4.x.x || 5.x.x, required by geofire@5.0.1

Expected behavior

Compatible geofire library with the latest firebase.

Actual behavior

The requirement restriction makes it impossible to use "firebase" and 'firebase-admin" together as it shows the known issue where google cloud complains that a "database" has already been registered when these two packages are imported in the same file.

ziyaddin commented 3 years ago

ping

prideaux commented 3 years ago

@ziyaddin can are you having the exactly the same issue as @ReverseControl or something different?

I ask as the OP was asking a year ago.

I'm using:

`firebase": "^7.23.0`
`geofire": "^5.0.1`

I am using React/React Native, I've had some issues myself but making some progress, replying in case I can offer some suggestions but would need more info.

ziyaddin commented 3 years ago

@prideaux thanks for reply. Mine is almost the same. I just get warning instead of error.

image
mschuetz72 commented 3 years ago

Is there any workaround for this issue?

I was able to develop and test without any issues locally, but I'm not able to deploy 😢

ziyaddin commented 3 years ago

@mschuetz72 what is the error you are facing with during deployment?

mschuetz72 commented 3 years ago

Hey @ziyaddin. Please disregard my comment about the failing deployment. The message was Deployment error. Function failed on loading usercode. and after going back to the last working commit and applying change by change it turned out that geofire wasn't referenced as dependency in the package file 🤷‍♂️ All working now, sorry for the confusion...