angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng is not recognized as an internal or external command

Open muscaiu opened this issue 10 years ago • 26 comments

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?

muscaiu avatar Jun 23 '16 12:06 muscaiu

You will need to log out then log back in for the change to your PATH variable to take effect.

You don't have to log out and back in, all you need to do is restart explorer.exe OR open up your CMD and run refreshenv

AhmetFUsta avatar Oct 03 '18 14:10 AhmetFUsta

I had the same issue "'ng' is not recognized as an internal or external command, operable program or batch file." when I was trying to run ng serve --host 0.0.0.0 form my command prompt. But as I run it via node.js command prompt, my issue resolve and I was able to run ng serve --host 0.0.0.0. And It also ran when I prefix it with npm run ng serve as mentioned above, but then I was facing issue for --host 0.0.0.0 as it was throwing error.

Can anyone tell me the reason why? What is happening which I am unable to get.?

debjyoti-pandit avatar Oct 09 '18 08:10 debjyoti-pandit

please don't confuse yourself... just do one thing

ADD -> " C:\Users\DELL\AppData\Roaming\npm " to PATH in system variable

All set !

b2rpt avatar Feb 02 '19 08:02 b2rpt

Please try to use Node.js command prompt in your windows. It will work.

tarundvarma49 avatar Mar 19 '19 11:03 tarundvarma49

npm start also works great

atul-bajpai avatar Aug 17 '19 18:08 atul-bajpai

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.