0

From today the Ionic CLI command

ionic generate page <name>

seems to be broken and I get this error:

> ng generate page test
Could not find an NgModule. Use the skip-import option to skip importing in NgModule.
[ERROR] Could not generate page

I'm trying from a brand new Ionic project just create with the Ionic Start procedure, selecting sidebar template.

This is my ionic info

Ionic:

   Ionic CLI                     : 5.4.16 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 5.3.1
   @angular-devkit/build-angular : 0.1000.7
   @angular-devkit/schematics    : 10.0.7
   @angular/cli                  : 10.0.7
   @ionic/angular-toolkit        : 2.3.2

Utility:

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

System:

   NodeJS : v10.22.0 (/Users/andreagesti/.nvm/versions/node/v10.22.0/bin/node)
   npm    : 6.14.6
   OS     : macOS Catalina

All the other Ionic CLI generate command (component, services ...) are still working without any problem.

Argo
  • 326
  • 3
  • 14
  • 1
    Are you using `ng generate` or `ionic generate`? You mention both. – R. Richards Aug 22 '20 at 22:39
  • I'm usin ionic generate, but I've tried both – Argo Aug 22 '20 at 22:42
  • Thank you, this answer works: https://stackoverflow.com/a/61172571/4146239 But I can't understand why other ionic command are still working, and only page generation seems to be broken. – Argo Aug 22 '20 at 22:48

0 Answers0