当我尝试将node-gyp安装到我的节点项目中以便能够安装socket.io时,我得到了这些npm错误:
我已经安装了所有dependencies的node-gyp:
任何人都可以帮我吗?
谢谢,卢克
答案 0 :(得分:2)
It looks like you don't have permissions to write to /usr/local/lib/node_modules/node-gyp
.
You could:
LukeG
on /usr/local/lib/node_modules/node-gyp
: sudo chown -R LukeG /usr/local
sudo
If it's your dev machine we're talking about I would go for the first option, since that's where you should install program libraries (http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/usr.html).
More on the subject: How/why does npm recommend not running as root?