2

I am try to use firebase (angularfire) with Angular/Nx. I found the plugin @nxtend/firebase.

https://nxtend.dev/docs/firebase/getting-started/

When trying to add it via ng add @nxtend/firebase I get the following error: An unhandled exception occurred: Schematic "ng-add" not found in collection "@nxtend/firebase".

The next command gives another error: nx generate @nxtend/firebase:init Error: Unable to resolve @nxtend/firebase:init. Cannot find generator 'init' in ....\node_modules@nxtend\firebase\collection.json.

I am using @nrwl/workspace": "12.9.0" - and Angular 12.x

Now my Questions:

  1. How to fix that?
  2. Can it be that @nxtend/firebase": "^11.1.2" ist not compatible with Angular 12.x?

And most important: 3. Ay suggestions how to integrate firebase/angularfire with Nx? Because unfortunatelly this seems to be a complicated task...

  • Does this answer your question? [How to integrate firebase in Nrwl Nx](https://stackoverflow.com/questions/47786667/how-to-integrate-firebase-in-nrwl-nx) – Andrew Allen Nov 15 '22 at 16:09

1 Answers1

0

I already successfully setup nx + angular + firebase. (ps. with only one app in nx monorepo)

details and pictures can be found here:

https://blog-host-d6b29.web.app/2022/11/27/nx-angular-fire.html

I suggest you also try to setup a new nx + angular workspace, walk through my steps and see how it works.

--

to work with angular & firebase, I suggest using The official Angular library for Firebase "@angular/fire".

https://github.com/angular/angularfire

Luke Chi
  • 91
  • 4