Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nomgrid opened this issue Jul 19, 2019 · 2 comments
Open

Comments

@nomgrid
Copy link

nomgrid commented Jul 19, 2019

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)

@LiamKarlMitchell
Copy link
Contributor

@nomgrid
Copy link
Author

nomgrid commented Jul 24, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants