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

前端 未结 19 1350
轻奢々
轻奢々 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:13

    You should not add C:\Users\Administrator\AppData\Roaming\npm\node_modules\angular-cli\bin\ng to your PATH. There is only a javascript file which you cannot use in terminal.

    You need ng.cmd which is probably located at %AppData%\Roaming\npm. Make sure this path is included in your PATH variable.

提交回复
热议问题