安装配置bower

Posted by yuk on 2015-12-29

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
[root@HD-Analysis center.dayugame.net]# bower install –allow-root

Option 1: you can run bower as root by typing:

1
bower install --allow-root

root is allowed by setting –allow-root command parameter

Option 2: is using global setting that allows root, by creating file: /root/.bowerrc which have inside following configuration:

1
{ "allow_root": true }