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

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

    What worked for me was that I was missing an file

    .npmrc
    

    which is located under

    C:\Users\username
    

    That file should contain

    prefix=$(APPDATA)\npm
    

    Also my environment path was pointing to my admin user

提交回复
热议问题