当我使用-g(全局)安装运行命令时,我会收到EACCESS错误。我读了一个堆栈溢出答案,我应该使用'sudo chown -R whoami
〜/ .npm'作为本地/ root管理员运行,但它没有帮助
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/.node/lib/node_modules/bower/.editorconfig'
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/Documents/tutorials/bookingappdemo
npm ERR! node -v v0.10.29
npm ERR! npm -v 2.0.0-alpha-5
npm ERR! path /Users/.node/lib/node_modules/bower/.editorconfig
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/Users/.node/lib/node_modules/bower/.editorconfig'
npm ERR! Additional logging details can be found in:
npm ERR! not ok code 0
答案 0 :(得分:1)
如果您是管理员,我建议您以root身份运行命令:
sudo npm install -g bower
答案 1 :(得分:0)
I used --unsafe-perm with install e.g
sudo npm install -g learnyounode --unsafe-perm
这有助于我进行无权限安装错误,希望此问题能尽快解决。