ng add error - catch clause variable is not an Error instance
- Dominant language
- TypeScript
- Stars
- 7.8k
- Forks
- 2.2k
- Avg merge
- 22h 28m
- Merged PRs (30d)
- 6
Description
### 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)
Contributor guide
Research direction
Reproduce the failure with `ng new App` followed by `ng add @angular/fire` using Angular 14.2.0. Start by inspecting `src/utilities/error.js`, `src/command-builder/schematics-command-module.js`, and `src/commands/add/cli.js` at the stack-trace locations. Done means the add command completes without the catch-clause assertion and reports errors correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, firebase, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100