ng add @angular/fire -> Package install failed
See original GitHub issueRunning ng add @angular/fire
on a fresh install of Angular results into Package install failed
Version info
Angular: 13.1.2 Node: 16.13.1 npm: 8.1.2 Firebase: 10.0.1 AngularFire: 7.2.0 OS: macOS Monterey (12.0.1)
How to reproduce these conditions
ng new <project>
ng add @angular/fire (no matter which option is chosen)
Result
ℹ Using package manager: npm
✔ Found compatible package version: @angular/fire@7.2.0.
✔ Package information loaded.
The package @angular/fire@7.2.0 will be installed and executed.
Would you like to proceed? Yes
✔ Package successfully installed.
UPDATE package.json (1171 bytes)
✔ Packages installed successfully.
? What features would you like to setup? ng deploy -- hosting
✖ Package install failed.
/Users/<user>/Projects/<project>/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/util/hostReportError.js:4
setTimeout(function () { throw err; }, 0);
^
TypeError: Cannot read properties of undefined (reading 'message')
at Object.error (/Users/<user>/Projects/<project>/node_modules/@angular/cli/models/schematic-command.js:432:47)
at SafeSubscriber.__tryOrUnsub (/Users/<user>/Projects/<project>/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/Subscriber.js:205:16)
at SafeSubscriber.error (/Users/<user>/Projects/<project>/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/Subscriber.js:156:26)
at Subscriber._error (/Users/<user>/Projects/<project>/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/Subscriber.js:92:26)
at Subscriber.error (/Users/<user>/Projects/<project>/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/Subscriber.js:72:18)
at TapSubscriber._error (/Users/<user>/Projects/<project>/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/operators/tap.js:75:26)
at TapSubscriber.Subscriber.error (/Users/<user>/Projects/<project>/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/Subscriber.js:72:18)
at MergeMapSubscriber.SimpleOuterSubscriber.notifyError (/Users/<user>/Projects/<project>/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/innerSubscribe.js:72:26)
at SimpleInnerSubscriber._error (/Users/<user>/Projects/<project>/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/innerSubscribe.js:30:21)
at SimpleInnerSubscriber.Subscriber.error (/Users/<user>/Projects/<project>/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/Subscriber.js:72:18)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:22
- Comments:16
Top Results From Across the Web
ng add @angular/fire "The package that you are trying to add ...
Yes ✔ Package successfully installed. The package that you are trying to add does not support schematics. You can try using a different...
Read more >Install @AngularFire Error:The package that you are trying to ...
I am trying to install @angular/fire using the ng add @angular/fire command. However, I keep getting the error: The package that you are ......
Read more >angular/fire - npm
The official Angular library for Firebase. ng add @angular/fire. AngularFire smooths over the rough edges an Angular developer might encounter ...
Read more >angular/angularfire2 - Gitter
ERROR in node_modules/@angular/fire/firebase.app.module.d.ts(2,79): error TS2307: ... grpc@1.16.0 install /Users/rajkot-13/Desktop/ng-fire/node_modules/grpc ...
Read more >Initialize Firebase in Angular applications using the ... - YouTube
Learn how to use the @ angular/fire schematic to install Firebase and AngularFire letting the CLI handle all the configuration for you.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I found that if you run
npm i -D firebase-tools
manually, this will fix the problem. If this doesn’t work, try:npm i -D firebase-tools@9
Had the same error message. Just ran the install script with
sudo
and got past it:sudo ng add @angular/fire
ng version output: