Skip to content

ng [command] --help does not work outside angular project folder for some commands #19057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
6 tasks
kuncevic opened this issue Oct 13, 2020 · 2 comments
Closed
6 tasks

Comments

@kuncevic
Copy link

🐞 Bug report

Command that does not work for in case of global cli marked with an x

  • new
  • [ x] build
  • [ x] serve
  • [ x] test
  • [ x] e2e
  • [ x] generate
  • [ x] add
  • update
  • [ x] lint
  • [ x] xi18n
  • [ x] run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes

Description

Help info should be available for any angular-cli related command regardless you inside angular-cli project folder (local cli) or outside angular-cli project folder (global cli)

🔬 Minimal Reproduction

Navigate outside angular-cli project in console then run any below command:

ng build --help
ng serve --help
ng test --help
ng e2e --help
ng generate --help
ng add --help
ng lint --help
ng xi18n --help
ng run --help

🔥 Exception or Error

Getting error: /private/var/folders/jj/sjmtmgms0d73pgpp6xqjgq480000gn/T/ng-UIzJTX/angular-errors.log" for further details.
Here is cat angular-errors.log:

[error] Error: Unable to locate a workspace file for workspace path.
    at Object.readWorkspace (/Users/Name/.nvm/versions/node/v12.18.4/lib/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/workspace/core.js:75:19)
    at async RunCommand.initialize (/Users/Name/.nvm/versions/node/v12.18.4/lib/node_modules/@angular/cli/models/architect-command.js:31:31)
    at async RunCommand.validateAndRun (/Users/Name/.nvm/versions/node/v12.18.4/lib/node_modules/@angular/cli/models/command.js:124:9)
    at async Object.runCommand (/Users/Name/.nvm/versions/node/v12.18.4/lib/node_modules/@angular/cli/models/command-runner.js:198:24)
    at async default_1 (/Users/Name/.nvm/versions/node/v12.18.4/lib/node_modules/@angular/cli/lib/cli/index.js:59:31)

🌍 Your Environment

Angular CLI: 10.1.4
Node: 12.18.4
OS: darwin x64

Angular: 
... 
Ivy Workspace: 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1001.4 (cli-only)
@angular-devkit/core         10.1.4 (cli-only)
@angular-devkit/schematics   10.1.4 (cli-only)
@schematics/angular          10.1.4 (cli-only)
@schematics/update           0.1001.4 (cli-only)

Also tested with the @next version and got exactly same issue

Angular CLI: 11.0.0-next.6
Node: 12.18.4
OS: darwin x64

Angular: 
... 
Ivy Workspace: 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1100.0-next.6 (cli-only)
@angular-devkit/core         11.0.0-next.6 (cli-only)
@angular-devkit/schematics   11.0.0-next.6 (cli-only)
@schematics/angular          11.0.0-next.6 (cli-only)
@schematics/update           0.1100.0-next.6 (cli-only)

@alan-agius4
Copy link
Collaborator

Duplicate of #16241

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants