question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng add error - catch clause variable is not an Error instance

See original GitHub issue

Version info

Angular:. 14.2.0

How to reproduce these conditions

  1. ng new App
  2. ng add @angular/fire

Debug output

** Errors in the JavaScript console **

An unhandled exception occurred: catch clause variable is not an Error instance See “/private/tmp/ng-qfEJEW/angular-errors.log” for further details.

** Output from /private/tmp/ng-qfEJEW/angular-errors.log **

[error] AssertionError [ERR_ASSERTION]: catch clause variable is not an Error instance at assertIsError (/xxx/node_modules/@angular/cli/src/utilities/error.js:19:26) at AddCommandModule.runSchematic (/xxx/node_modules/@angular/cli/src/command-builder/schematics-command-module.js:304:43) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async AddCommandModule.executeSchematic (/xxx/node_modules/@angular/cli/src/commands/add/cli.js:283:20) at async AddCommandModule.handler (/xxx/node_modules/@angular/cli/src/command-builder/command-module.js:111:24)

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lazar0303commented, Dec 1, 2022

you can also npm install -g firebase-tools firebase login

1reaction
byrondovercommented, Nov 24, 2022

You can also work around this issue by installing firebase-tools as a dev dependency before running the schematic.

e.g.

yarn add -D firebase-tools
Read more comments on GitHub >

github_iconTop Results From Across the Web

AngularJs CLI An unhandled exception occurred:catch ...
AngularJs CLI An unhandled exception occurred:catch clause variable is not an Error instance, while creating angular component using ng g c my- ...
Read more >
Catch clause variable type annotation must be any or ...
The error "Catch clause variable type annotation must be 'any' or 'unknown'" occurs when we try to type the error variable in a...
Read more >
AngularJs CLI An unhandled exception occurred:catch ...
[Solved]-AngularJs CLI An unhandled exception occurred:catch clause variable is not an Error instance, while creating angular component using ng g c my-compnnt- ...
Read more >
Angular CLI 14.1.1 Release
Commits: 43 impacting commits. 2 Features Released with 14.1.1. ng generate component - catch clause variable is not an Error instance.
Read more >
Introduction to error handling in Angular 7: Part 1
As an Angular developer, you already know errors can be caused by personal mistakes, like having an import statement with the file extension ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found