ng add error - catch clause variable is not an Error instance
- Ngôn ngữ chính
- TypeScript
- Star
- 7.8k
- Fork
- 2.2k
- Merge trung bình
- 22 giờ 28 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
### 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)
Hướng dẫn đóng góp
Hướng nghiên cứu
Tái hiện lỗi bằng `ng new App`, sau đó là `ng add @angular/fire`, sử dụng Angular 14.2.0. Bắt đầu bằng cách kiểm tra `src/utilities/error.js`, `src/command-builder/schematics-command-module.js` và `src/commands/add/cli.js` tại các vị trí trong stack trace. Hoàn thành khi lệnh add chạy xong mà không gặp assertion trong mệnh đề catch và báo cáo lỗi chính xác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, firebase, typescript
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100