Skip to content

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

@rajinder-yadav

Description

@rajinder-yadav

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.

 ionic g page pages/home

Getting the following error

> 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/@[email protected]/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/@[email protected][email protected]/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions