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 子句 assertion 的情況下完成,並正確回報錯誤時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- angular, firebase, typescript
- 領域
- cli
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100