npm throws EACCES error on installation of Angular CLI

后端 未结 9 551
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 15:34

I am unable to install Angular Cli globally through npm. I keep getting this error when I run npm install -g @angular/cli on macOS:

npm ERR! nod         


        
9条回答
  •  醉梦人生
    2020-12-11 15:56

    WARNING: Check that $(npm config get prefix) does not point to /usr by typing echo $(npm config get prefix)

    I solved like that

    sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
    

    Worked for me

提交回复
热议问题