angular / angular/angularfire

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

オープン
#3,289 コメント 19 件 リアクション 9 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
7.8k
フォーク
2.2k
平均マージ
22時間 28分
マージ済み PR(30日)
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` を実行し、失敗を再現します。まず、スタックトレースに示された箇所の `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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。