geofirex icon indicating copy to clipboard operation
geofirex copied to clipboard

TypeError: app.firestore is not a function at new GeoFireCollectionRef

Open nomgrid opened this issue 6 years ago • 2 comments

GeoFireCollectionRef.setDoc causes SSR cloud function to fail. It works perfectly fine when being called from the client.

Error message from Firebase console: TypeError: app.firestore is not a function at new GeoFireCollectionRef (/srv/dist/server.js:303314:24) at GeoFireClient.collection (/srv/dist/server.js:303488:16) at new ListingService (/srv/dist/server.js:161140:39) at ListingService_Factory (/srv/dist/server.js:161248:157) at _callFactory (/srv/dist/server.js:26514:20) at createProviderInstance (/srv/dist/server.js:26472:26) at resolveNgModuleDep (/srv/dist/server.js:26447:17) at NgModuleRef.get (/srv/dist/server.js:27141:16) at injectInjectorOnly (/srv/dist/server.js:8502:33) at Module.ɵɵinject (/srv/dist/server.js:8507:57)

nomgrid avatar Jul 19 '19 18:07 nomgrid

Related to this stack overflow? https://stackoverflow.com/questions/55927734/how-to-use-geofirex-inside-google-cloud-functions

LiamKarlMitchell avatar Jul 23 '19 06:07 LiamKarlMitchell

Related to this stack overflow? https://stackoverflow.com/questions/55927734/how-to-use-geofirex-inside-google-cloud-functions

I'm not actually trying to use geofirex inside a cloud function. I'm using it in an Angular app which uses Angular Universal for SSR. The issue is that the SSR function is crashing out when it is called since geofirex exists inside the App and the server.js file.

nomgrid avatar Jul 24 '19 12:07 nomgrid