-5

C:\Users\Vivek Ghanchi>ng 'ng' is not recognized as an internal or external command, operable program or batch file.

I have installed angular CLI but it is showing me the ng is not recognized is there any solution

Carlos Mermingas
  • 3,822
  • 2
  • 21
  • 40
Vivek Ghanchi
  • 232
  • 4
  • 16
  • Have you installed Angular CLI globally? Is it included in the PATH variable? – Tushar Jul 06 '17 at 04:08
  • Possible duplicate of [fixing npm path in Windows 8](https://stackoverflow.com/questions/27864040/fixing-npm-path-in-windows-8) – Onic Team Jul 06 '17 at 05:57

6 Answers6

2

You should install angular cli by enter the following command:

npm install -g @angular/cli
Koray Tugay
  • 22,894
  • 45
  • 188
  • 319
huydq5000
  • 274
  • 1
  • 8
2

Use; Environment Tables -> System variables -> Path:

C:\Users\*'Your User'*\AppData\Roaming\npm

not

C:\Users\Administrator\AppData\Roaming\npm**\node_modules\angular-cli\bin**

Be aware that the path should point to YOUR USER work directory if You are not working on Administrator account.

Willem van Ketwich
  • 5,666
  • 7
  • 49
  • 57
Nortberg
  • 21
  • 2
0

I solved it few days ago, after having the same problem with other global modules, by adding to:

Environment Tables -> System variables -> Path:

C:\Users\Administrator\AppData\Roaming\npm\node_modules\angular-cli\bin;C:\Program Files\MongoDB\Server\3.2\bin

Note that it must not have any spaces after ; That turned out to be my problem.

0

Use this link to know about angular CLI. After installing Angular CLI you can able to see workable ng command.

Shanmugaraja_K
  • 1,914
  • 3
  • 13
  • 25
0

I was facing the same issue, I uninstalled node js and then reinstalled it. Now if you run node --version, it will show current version of node, Its 14.16.1 in my case. Now run command npm install @angular/cli. It will install angular CLI. One can also run npm --version before angular cli installation for being sure that npm is working. Might be helpful for someone.

Analyst
  • 751
  • 6
  • 15
0

try ng --help to see if your command parameter is in the list, and word is correct. For example, ng -v is not support in new version, use ng v instead.

yu yang Jian
  • 6,680
  • 7
  • 55
  • 80