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
I am trying to use Firebase in my Angular app. The problem appears to emerge whenever I am injecting my AuthService which is dependent on some angularfire components.
So, just the constructor which receives an AuthService instance makes the difference here between crashing and not crashing:
The AuthService is just a simple implementation for authentication where I am using things like AngularFireAuth. The code below (collapsed) is straight forward and is probably not the root of the problem but just for completeness here it is:
@firebase/auth:
Auth (9.0.0): INTERNAL ASSERTION FAILED: Expected a class definition
Debug output
In my project I am getting the following error message during build:
./src/app/services/auth.service.ts:3:0-39 - Error: Module not found: Error: Package path ./compat is not exported from package /home/sfalk/workspacesweb-mobile/node_modules/firebase (see exports field in /home/sfalk/workspaces/web-mobile/node_modules/firebase/package.json)
As a result, the app simply does not work at all:
The text was updated successfully, but these errors were encountered:
Version info
Angular: 12
Firebase: 9.01
AngularFire: 7.0.3
The issue
I am trying to use Firebase in my Angular app. The problem appears to emerge whenever I am injecting my
AuthService
which is dependent on some angularfire components.So, just the constructor which receives an
AuthService
instance makes the difference here between crashing and not crashing:Crashing
Not crashing
AuthService
The
AuthService
is just a simple implementation for authentication where I am using things likeAngularFireAuth
. The code below (collapsed) is straight forward and is probably not the root of the problem but just for completeness here it is:Click me
How to reproduce these conditions
Failing test unit, Stackblitz demonstrating the problem
I think I maneged to reproduce this. The error message in the StackBlitz example is different but leads me to the same conclusion:
https://stackblitz.com/edit/angular-fire-start-np32w7?file=app%2Fapp.component.ts
Debug output
In my project I am getting the following error message during build:
As a result, the app simply does not work at all:
The text was updated successfully, but these errors were encountered: