You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.
I'm trying to use firestorm in angular project, but have unexpected issue related to di (probably).
The thing is that something imports GeoPoint.js before I actually instantiate firebase library (despite the fact that I do that even BEFORE any imports in main.ts):
core.js:4002 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'GeoPoint' of undefined
TypeError: Cannot read property 'GeoPoint' of undefined
at new GeoPoint (GeoPoint.js:10)
The following patch solves the issue, and everything works fine.
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
- var app_1 = require("firebase/app");
+ var app_1 = require("firebase");
/**
* Wrapper for firestore geopoint class, mainly used to keep
* imports clean when using the library.
*/
var GeoPoint = /** @class */ (function () {
function GeoPoint(latitude, longitude) {
this._native = new app_1.firestore.GeoPoint(latitude, longitude);
Any example of configuring FireStorm with AngularFire? I'm initializing Firebase as follows: @NgModule({ declarations: [AppComponent], imports: [ ... AngularFireModule.initializeApp(environment.firebase), ... ]} );
Have not come across examples on how to go about it with Angular.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to use firestorm in angular project, but have unexpected issue related to di (probably).
The thing is that something imports GeoPoint.js before I actually instantiate firebase library (despite the fact that I do that even BEFORE any imports in main.ts):
The following patch solves the issue, and everything works fine.
You can try this yourself:
https://stackblitz.com/edit/angular-kspirb?file=src%2Fapp%2Fapp.module.ts
Probably anyone knows any workarounds or can approve that changing require() to 'firebase' is ok and I can make pull request with this change?
The text was updated successfully, but these errors were encountered: