Skip to content

Generate guard error: 'implements' list cannot be empty #4058

Closed

Description

@bene-we

Bug Report

Ionic version:

[x] 4.x

Current behavior:

When calling ionic g guard <guardName>, the implements list is empty and an error is thrown:

image

Expected behavior:

Ionic CLI should prompt the user which interface he would like to implement and create the Guard from this basis (see Other information)

Steps to reproduce:

Call ionic g guard auth

Other information:

The error could occur due to an update of ng generate guard, because when calling the command the user is prompted which interface he would like to implement:

image

Ionic info:


Ionic:

   Ionic CLI                     : 5.1.0 (C:\Users\Bene\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.4.2
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 5 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.6

System:

   NodeJS : v10.15.3 (C:\Program Files\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

Activity

  1. changed the title [-]bug: [/-] [+]Generate guard error: 'implements' list cannot be empty[/+] on Jun 28, 2019
  2. imhoffd commented on Jun 28, 2019

    @imhoffd
    Contributor

    Thanks @bene-we, looks like we have some updates to make to support these prompts. I opened this issue, but we may move it to the CLI repo (unsure of the best spot at the moment): https://github.com/ionic-team/angular-toolkit/issues/159

    cc @mhartington

  3. bene-we commented on Jun 29, 2019

    @bene-we
    Author

    Sure, feel free to do so, thanks for taking care of.
    The prompt is already working on the command ionic generate, maybe you can start there and implement it on ionic g guard as well.

  4. added a commit that references this issue on Aug 16, 2019
    8e851b0
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