[英]Cant install npm packages due to permissions
I just installed npm and node and am trying to install packages:我刚刚安装了npm和node,并且正在尝试安装软件包:
npm install -g d3
However, I get this ERROR:但是,我收到此错误:
checkPermissions Missing write access to /usr/local/lib/node_modules
Using sudo
works, but how can I get around this long term?使用sudo
可以工作,但是如何长期解决呢? I don't want to have to use sudo
every time.我不想每次都使用sudo
。
I just installed npm and node and am trying to install packages:我刚刚安装了npm和node,并且正在尝试安装软件包:
npm install -g d3
However, I get this ERROR:但是,我收到此错误:
checkPermissions Missing write access to /usr/local/lib/node_modules
Using sudo
works, but how can I get around this long term?使用sudo
可以工作,但是如何长期解决呢? I don't want to have to use sudo
every time.我不想每次都使用sudo
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.