Skip to content
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

ng version bug #18667

Closed
1 of 15 tasks
xgqfrms opened this issue Sep 1, 2020 · 3 comments
Closed
1 of 15 tasks

ng version bug #18667

xgqfrms opened this issue Sep 1, 2020 · 3 comments

Comments

@xgqfrms
Copy link

xgqfrms commented Sep 1, 2020

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

Yes, the previous version in which this bug was not present was: ....

not sure

Description

A clear and concise description of the problem...
  1. website error

https://angular.io/cli/version

REQUEST FOR DOCUMENT FAILED.

We are unable to retrieve the "cli/version" page at this time. Please check your connection and try again later.

  1. command error
$ ng --version

$ ng -v
An unhandled exception occurred: ENOENT: no such file or directory, scandir '/Users/xgqfrms-mbp/Documents/GitHub/Angular-8.x-in-Action/node_modules'
See "/private/var/folders/qm/csrtpvpn62x82v4zykvsrnw80000gn/T/ng-oL5J8g/angular-errors.log" for further details.

image

image

🔬 Minimal Reproduction

  1. install angular cli
#
$ yarn global add @angular/cli
  1. executing above commands
$ ng --version

$ ng -v

🔥 Exception or Error




An unhandled exception occurred: ENOENT: no such file or directory, scandir '/Users/xgqfrms-mbp/Documents/GitHub/Angular-8.x-in-Action/node_modules'
See "/private/var/folders/qm/csrtpvpn62x82v4zykvsrnw80000gn/T/ng-oL5J8g/angular-errors.log" for further details.

🌍 Your Environment




➜  ~ uname -a
Darwin xgqfrms-mbp.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
➜  ~ 


Anything else relevant?

@xgqfrms
Copy link
Author

xgqfrms commented Sep 1, 2020

error log

[error] Error: ENOENT: no such file or directory, scandir '/Users/xgqfrms-mbp/Documents/GitHub/Angular-8.x-in-Action/node_modules'
    at Object.readdirSync (fs.js:948:3)
    at VersionCommand.run (/Users/xgqfrms-mbp/.config/yarn/global/node_modules/@angular/cli/commands/version-impl.js:52:41)
    at VersionCommand.validateAndRun (/Users/xgqfrms-mbp/.config/yarn/global/node_modules/@angular/cli/models/command.js:135:39)
    at async Object.runCommand (/Users/xgqfrms-mbp/.config/yarn/global/node_modules/@angular/cli/models/command-runner.js:198:24)
    at async default_1 (/Users/xgqfrms-mbp/.config/yarn/global/node_modules/@angular/cli/lib/cli/index.js:62:31)



@xgqfrms
Copy link
Author

xgqfrms commented Sep 1, 2020

why must create project first, then can get the version info

--version is so common usage, why change it to just version

why not using -v, but v, very confused me ❓

$ ng --help
$ ng -h
# $ ng help

# must create project first, then can get the version info
$ ng new angular-fullstack-app

# $ ng --version
$ ng version
$ ng v
➜  angular-fullstack-app git:(master) ✗ ng v 

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 10.0.8
Node: 12.18.0
OS: darwin x64

Angular: 10.0.14
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1000.8
@angular-devkit/build-angular     0.1000.8
@angular-devkit/build-optimizer   0.1000.8
@angular-devkit/build-webpack     0.1000.8
@angular-devkit/core              10.0.8
@angular-devkit/schematics        10.0.8
@angular/cli                      10.0.8
@ngtools/webpack                  10.0.8
@schematics/angular               10.0.8
@schematics/update                0.1000.8
rxjs                              6.5.5
typescript                        3.9.7
webpack                           4.43.0
    
➜  angular-fullstack-app git:(master) ✗ 

@xgqfrms xgqfrms closed this as completed Sep 1, 2020
@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 Oct 2, 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

1 participant