ng --version reports wrong version number
See original GitHub issueAfter installing angular-cli to the latest, the --version command returns version 1.0.0-beta.30 instead of 1.0.0-rc.0
OS?
Windows 10
Versions.
This is what is at issue.
Repro steps.
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest
The log given by the failure.
-- @angular/cli@1.0.0-rc.0
+-- @angular/compiler@2.4.8
+-- @angular/compiler-cli@2.4.8
...
PS C:\Projects> ng --version
@angular/cli: 1.0.0-beta.30
node: 6.9.5
os: win32 x64
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
global `ng version` shows errors instead of version numbers
Changing directory to one of my project that had node_modules, then ng version showing the installed package versions correctly.
Read more >Ng V Still Showing Older Version Number After Updating To ...
Ng V Still Showing Older Version Number After Updating To Latest Angular Cli ... to false and is no longer required to report...
Read more >ng --version shows <error> for Angular version number and ...
Coding example for the question ng --version shows for Angular version number and some packages-angular.js.
Read more >ng update - Angular
To update to the next beta or pre-release version, use the --next option. ... boolean, false ... Shows a help message for this...
Read more >Windows Package Manager - Salt Project Documentation
Masterless minion: C:\salt\srv\salt\win\repo-ng ( salt://win/repo-ng ) ... Default is False ... The exact version number as shown in Add/Remove Programs.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@bklik I know there are cases in windows where npm global installs get out of sync and it really sucks to figure out where the leftover modules are. I think it might be related to
nvm
.It’s not a CLI issue though… the CLI can’t really control that sort of stuff. So in that sense it’s not something I want to leave open in this issue tracker.
Even after running
npm uninstall -g @angular/cli
andnpm uninstall -g angular-cli
then reinstalling, I found that it still didn’t work.I tried an
ng -v
after uninstalling both, and surprisingly found that it would still output the beta version of angular-cli. I looked in theC:\Program Files\nodejs\node_modules
and found a folder calledangular-cli
. After removing it, and re-installing angular-cli, angular-cli would fail to run afterward.I gave up, uninstalled nodejs. Deleted
C:\Program Files\nodejs
and deleted all npm and npm-cache folders from my AppData. Reinstall nodejs, and rannpm install -g @angular/cli@latest
.I’m now properly receiving the correct version:
Not a real work around. I think the answer lies in where that ‘angular-cli’ folder in ‘nodejs/node_modules’ came from, and how to properly remove it.