'ng' is not recognized as an internal or external command, operable program or batch file

前端 未结 19 1353
轻奢々
轻奢々 2021-01-31 01:31

I tried running npm install -g angular-cli

I also tried adding it to the Enviorment Variables under PATH: (C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node

19条回答
  •  滥情空心
    2021-01-31 02:08

    I had the same issue on Windows7. I resolved it setting correct path.

    1. First find ng.cmd file on your System. It will usually at:

      E:\Users\\AppData\Roaming\npm
      
    2. Set PATH to this location.

    3. Close existing command window and open new one

    4. Type

      ng version
      

    Also remember to install angular with -g command.

    npm install -g @angular/cli
    

提交回复
热议问题