ng add @angular/fire "The package that you are trying to add does not support schematics"

Viewed 5020

I've just updated to Angular CLI 12.0.0, using Node 14.17.0, and npm 7.13.0

When I try to add Angular Fire to my project

ng add @angular/fire

I get the message:

The package @angular/fire@0.0.0 will be installed and executed. Would you like to proceed? Yes āœ” Package successfully installed. The package that you are trying to add does not support schematics. You can try using a different version of the package or contact the package author to add ng-add support.

Using npm uninstall @angular/fire doesn't help.

Any help is appreciated!

NOTE: as @deelde mentioned below, this is a new, known bug, so for the time being, I've reverted to Angular CLI v11.2.13, and it's working.

Uninstall:

npm uninstall -g @angular/cli
npm cache clean --force

To make sure the uninstall worked, this should give an error:

ng --version

Reinstall Angular CLI v11

npm install -g @angular/cli@11.2.13
2 Answers

there is an open issue in github with this behaviour. It seems to be a problem with a module called "blueprint" in angular/fire version 6.1.4.

Github Issue: Unable to ng add @angular/fire on first try on Angular 12 in brand new app

The author mentioned that if he executed the command a second time, everything worked.

Another option could be to install the package via npm install and then execute ng add:

npm install @angular/fire@6.1.4
ng add @angular/fire@6.1.4 --verbose

Angular Fire for now do not support angular12, so you should use the latest version of angular fire:

ng add @angular/fire@latest
Related