转自:http://blog.youkuaiyun.com/hexiaodouaipiqiu/article/details/51733176
执行bower命令后出现以下错误提示:
bower ESUDO Cannot be run with sudo
Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.
http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814
You can however run a command with sudo using --allow-root option
解决方法有两种:
1,根据错误提示在bower命令后面加--allow-root ,例如 bower install --allow-root
2,增加一个配置文件使得运行bower时候为root权限,~/.bowerrc
内容如下
{"allow_root": true }
本文介绍了解决使用bower命令时遇到的权限错误问题。主要提供了两种解决方案:一是通过添加--allow-root选项来直接运行命令;二是配置.bowerrc文件以允许root用户执行bower命令。
1941

被折叠的 条评论
为什么被折叠?



