Skip to content

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

Closed

Description

@jerrynavi

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

Activity

  1. WMOH-DEV commented on Jan 16, 2024

    @WMOH-DEV

    same here, can not generate component

    standalone is not defined
    
  2. joelcoxokc commented on Jan 20, 2024

    @joelcoxokc

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

  3. dodomui commented on Jan 29, 2024

    @dodomui

    Same here.

  4. migueldv90 commented on Jan 29, 2024

    @migueldv90

    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

  5. dodomui commented on Jan 31, 2024

    @dodomui

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

  6. jerrynavi commented on Jan 31, 2024

    @jerrynavi
    Author

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

  7. forrest-lyman commented on Mar 15, 2024

    @forrest-lyman

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions