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

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

    If angular cli is installed and ng command is not working then please see below suggestion, it may work

    In my case problem was with npm config file (.npmrc ) which is available at C:\Users{user}. That file does not contain line registry https://registry.npmjs.org/=true. When i have added that line command started working. Use below command to edit config file. Edit file and save. Try to run command again. It should work now.

    npm config edit
    

提交回复
热议问题