执行npm install -g bower时出现EACCESS错误 [英] EACCESS Error when doing npm install -g bower

查看:106
本文介绍了执行npm install -g bower时出现EACCESS错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行带有-g(全局)安装的命令时,出现EACCESS错误.我读到一个堆栈溢出答案之一,我应该使用'sudo chown -R whoami〜/.npm'作为本地/root管理员运行,但这没有帮助

When i run a command with -g (global) installation i get EACCESS errors . I read on one of the stack overflow answers that i should use 'sudo chown -R whoami ~/.npm' to run as local/root adminstrator but it didnt help

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

推荐答案

如果您是管理员,建议您以root用户身份运行命令: sudo npm install -g bower

If you are an administrator I suggest you run the command as root: sudo npm install -g bower

这篇关于执行npm install -g bower时出现EACCESS错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆