Roma Kostelnyy
Roma Kostelnyy

Reputation: 193

Can not install latest version of Angular CLI

I start a new project with Angular, so decided to upgrade my global packages.

I run Windows10. Command ng -v returns me:

Angular CLI: 6.0.8
Node: 8.12.0
OS: win32 x64

At the moment of writing this, the latest stable version is 6.2.4, as npmjs.com says.

In order to upgrade to the latest version I run:

npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/cli@latest

All commands complete successfully, and now I checking ng -v but it is still 6.0.8. I would expect it to be 6.2.4.

What I'm doing wrong?

Upvotes: 0

Views: 2788

Answers (2)

billyjov
billyjov

Reputation: 2970

Run npm upgrade -g @angular/cli should work properly.

Upvotes: 2

Vivek Kumar
Vivek Kumar

Reputation: 5040

You might be running this command from a directory which might have a node_modules folder in it.

For example, if you inside of any angular project directory then ng is local not the global one.

Please try running this command from some directory.

Upvotes: 0

Related Questions