ionic-team / ionic-team/ionic-cli

Could not find an NgModule. Use the skip-import option to skip importing in NgModule.

Đang mở
#5,100 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
TypeScript
Star
2k
Fork
682
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Description:**

Seems like the CLI doesn't understand Angular 19 standalone conmponent. I am unable to create a page using:

FYI: Standalone component is now the default.

```sh
ionic g page pages/home
```

Getting the following error

```sh
> ng generate page pages/home --project=app
Could not find an NgModule. Use the skip-import option to skip importing in NgModule.
[ERROR] Could not generate page.
```

**My `ionic info`:**

```
$ ionic info

Ionic:

Ionic CLI : 7.2.0 (/home/yadav/.local/share/pnpm/global/5/.pnpm/@ionic+cli@7.2.0/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.4.1
@angular-devkit/build-angular : 19.0.6
@angular-devkit/schematics : 19.0.0 (/home/yadav/.local/share/pnpm/global/5/.pnpm/@angular-devkit+schematics@19.0.0_chokidar@3.6.0/node_modules/@angular-devkit/schematics)
@angular/cli : 19.0.6
@ionic/angular-toolkit : 12.1.1

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v22.11.0 (/home/yadav/.nvm/versions/node/v22.11.0/bin/node)
npm : 10.9.0
OS : Linux 6.12
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Reproduce the reported `ionic g page pages/home` command in an Angular 19 standalone-component project and trace the CLI's page-generation entry point when it invokes `ng generate page`. Done means page generation succeeds without requiring an NgModule, while preserving the existing `--skip-import` behavior.

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, 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.