ng is not recognized as an internal or external command

Cristian Muscalu picture Cristian Muscalu · Jun 23, 2016 · Viewed 568.9k times · Source

Running windows 7 Professional 32bit.

I tried running npm install -g angular-cli both under normal or admin. 2016-06-23_14h46_40

I also tried adding it to the Enviorment Variables under PATH: (C:\Users\Administrator\AppData\Roaming\npm\node_modules\angular-cli\bin\ng) , with no success also.
2016-06-23_14h56_48

What am i doing wrong?

Answer

BehrouzMoslem picture BehrouzMoslem · Sep 6, 2017

I solved this problem in accordance with the figure:

run in cmd

 npm install -g @angular/cli

and then

( open in Windows 10) Control Panel\All Control Panel Items\System or accordance with the figure

step 1:

enter image description here

step 2 :

enter image description here

step3:

enter image description here

step4:

enter image description here

step5:

enter image description here

Finally, restart all opened command prompts, or you can also restart the computer.