npm throws EACCES error on installation of Angular CLI

后端 未结 9 606
没有蜡笔的小新
没有蜡笔的小新 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:48

    This was a great link for me.

    https://flaviocopes.com/npm-fix-missing-write-access-error/

    once I did this command

    sudo chown -R $USER /usr/local/lib/node_modules
    

    in my terminal, the angular CLI install worked perfectly!

提交回复
热议问题