ng add error - catch clause variable is not an Error instance
- 主要语言
- TypeScript
- 星标
- 7.8k
- 派生
- 2.2k
- 平均合并
- 22 小时 28 分钟
- 30 天内合并 PR
- 6
描述
### 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)
贡献指南
调研方向
使用 Angular 14.2.0,通过先运行 `ng new App` 再运行 `ng add @angular/fire` 来重现该失败。首先检查 stack trace 所示位置的 `src/utilities/error.js`、`src/command-builder/schematics-command-module.js` 和 `src/commands/add/cli.js`。当 add 命令在没有触发 catch 子句断言的情况下完成,并且能够正确报告错误时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, firebase, typescript
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100