Typeof process Why is GeoFire only exported when running in Node
Closed this issue · 5 comments
WilfredR commented
I'd like to use GeoFire in my mobile project created with Fusetools
It's not clear to me why typeof process !== "undefined"
is included.
// Export GeoFire if this is being run in node
if (typeof module !== "undefined" && typeof process !== "undefined") {
module.exports = GeoFire;
}
Or in other words, what will go wrong if I export GeoFire module without process being defined.
Thanks!
doovers commented
Wondering the same thing. I'm trying to use in an Angular 6 project and process
is undefined
Hugoer commented
Same problem, some solution? Thanks for the effort
doovers commented
@Hugoer Here is what I did...
node_modules/geofire/dist/geofire.js (1223)
Move export outside of if statement because process is undefined
// Export GeoFire if this is being run in node
if (typeof module !== "undefined" && typeof process !== "undefined") {
}
module.exports = GeoFire; // *** Move this line out of if statement