Ubuntu – Can’t get bower working – bower ESUDO Cannot be run with sudo

Ubuntu

I get the following error when I run bower:

bower ESUDO Cannot be run with sudo

Thing is, I'm not running bower with sudo. The command I run is:

bower install foo

or

bower search cats

I am logged in as root to an Ubuntu 12.04 server but I am not using sudo. What gives? How do I get bower working?

Best Answer

I had the same problem. All you have to do is add --allow-root to your command.

See this issue.