Skip to content

ng <command> --help does not work #16241

Closed
@KissBalazs

Description

@KissBalazs

🐞 bug report

Affected Package

The issue is caused by package @angular/cli

Is this a regression?

not sure.

Description

Angular cli commands seems to be working, but the --help flag does not work in them in angular 8. It is suggested in the documentation in multiple places that it should.

🔬 Minimal Reproduction

(npm uninstall -g @angular/cli)
npm install -g @angular/cli@latest
ng generate --help

🔥 Exception or Error

forest@forest:~$ ng generate --help

An unhandled exception occurred: Unable to locate a workspace file for workspace path.
See "/tmp/ng-s4wanw/angular-errors.log" for further details.

forest@forest:~$ cat /tmp/ng-MYDOue/angular-errors.log

[error] Error: Unable to locate a workspace file for workspace path.
    at Object.readWorkspace (/home/forest/.nvm/versions/node/v12.3.1/lib/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/workspace/core.js:74:19)
    at async GenerateCommand._loadWorkspace (/home/forest/.nvm/versions/node/v12.3.1/lib/node_modules/@angular/cli/models/schematic-command.js:442:35)
    at async GenerateCommand.initialize (/home/forest/.nvm/versions/node/v12.3.1/lib/node_modules/@angular/cli/models/schematic-command.js:40:9)
    at async GenerateCommand.initialize (/home/forest/.nvm/versions/node/v12.3.1/lib/node_modules/@angular/cli/commands/generate-impl.js:12:9)
    at async GenerateCommand.validateAndRun (/home/forest/.nvm/versions/node/v12.3.1/lib/node_modules/@angular/cli/models/command.js:124:9)
    at async Object.runCommand (/home/forest/.nvm/versions/node/v12.3.1/lib/node_modules/@angular/cli/models/command-runner.js:186:24)
    at async default_1 (/home/forest/.nvm/versions/node/v12.3.1/lib/node_modules/@angular/cli/lib/cli/index.js:54:31)forest@forest:~$ ^C

🌍 Your Environment

Angular Version:


Angular CLI: 8.3.19
Node: 12.3.1
OS: linux x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.803.19
@angular-devkit/core         8.3.19
@angular-devkit/schematics   8.3.19
@schematics/angular          8.3.19
@schematics/update           0.803.19
rxjs                         6.4.0

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions