I have a NX Monorepo having an Angular app and a NestJs app. I also have an authentication library in the libs folder. I have setup AngularFire in the app.module.ts
as follows:
provideFirebaseApp(() => initializeApp(environment.firebase)),
provideAuth(() => getAuth()),
provideFunctions(() => getFunctions()),
provideStorage(() => getStorage()),
I would like to use firebase in my authentication library, and any other library I may need, but for obvious reasons, using it directly will result in a NullInjectorError
error. Is there a way I can use firebase in a monorepo across libraries and multiple applications.
You can't instantiate angularfire in the library modules as it throws the following error:
Deploy requires an Angular project type of "application" in angular.json