npm install error ( npm install -g angular-cli ) in windows 10

Rohit Yadav picture Rohit Yadav · Jun 7, 2017 · Viewed 15.2k times · Source

node -v

v4.5.0

npm -v

5.0.1

Has anyone faced this kind of issue while installing angular-cli in windows 10?

Answer

Hamed Baatour picture Hamed Baatour · Jun 7, 2017

Try the following:

step 0: run this command

npm uninstall -g @angular/cli
npm cache clean

step 1: delete this folder: C:\Users\%YOUR-USERNAME%\AppData\Roaming\npm

step 2: uninstall Nodejs from Windows

step 3: restart your PC

step 4: install a fresh copy of Nodejs from here: https://nodejs.org/en/

step 5: install the CLI globally

npm install -g @angular/cli@latest