ionic-team / ionic-cli

The Ionic command-line interface
MIT License
1.99k stars 640 forks source link

Unable to generate standalone component with `ionic generate` or `ng generate` #5073

Closed jerrynavi closed 3 months ago

jerrynavi commented 4 months ago

Description: Running ionic generate component <component-name> or ng generate component <component-name> with the --standalone flag always throws the error: "Error: Unknown argument: standalone".

Steps to Reproduce: Run ionic generate component test --standalone in an Ionic project.

Output: Error: Unknown argument: standalone

My ionic info:

Ionic:

   Ionic CLI                     : 7.1.5 (/opt/homebrew/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 7.6.1
   @angular-devkit/build-angular : 17.0.7
   @angular-devkit/schematics    : 17.0.7
   @angular/cli                  : 17.0.7
   @ionic/angular-toolkit        : 11.0.0

Utility:

   cordova-res                          : 0.15.4
   native-run (update available: 2.0.0) : 1.5.0

System:

   NodeJS : v18.19.0 (/opt/homebrew/Cellar/node@18/18.19.0/bin/node)
   npm    : 10.2.3
   OS     : macOS Unknown

Other Information: Nothing to report

WMOH-DEV commented 4 months ago

same here, can not generate component

standalone is not defined
joelcoxokc commented 3 months ago

hey ionic team any updates on this... Generating components is not working

dodomui commented 3 months ago

Same here.

migueldv90 commented 3 months ago

I was able to fix this issue by updating the angular and ionic libraries.

ng update and npm update

I want to say it was fixed in feat-ng-vite-support #5064

dodomui commented 3 months ago

fixed by updated to "@ionic/angular-toolkit": "^11.0.1",

jerrynavi commented 3 months ago

Closing as it's been fixed on "@ionic/angular-toolkit": "^11.0.1"

forrest-lyman commented 2 months ago

You should reopen this ticket; I just did a fresh build with npx and it installed the angular toolkit 9.x