Bower and Ubuntu

Bower and Ubuntu

Posted: 9 years ago in  Unix | HTML-CSS-JS | Miscellaneous |


Bower is a package manager which is very useful for front-end developer who use angular, cordova, etc...


Bower is a package manager which is very useful for front-end developer who use angular, cordova, etc...

It would fetch js libraries and maintain to re-download with specific version. Differ from other package managers that Bower will manage not only javascript sourcecode but alsoimages, stylesheet.... The package here means third-party code which support a feature in front-end application

The main reason I use Bower here is for my Angular/Cordova projetcs.

Install dependencies

To install it in Ubuntu, we need node, npm packages. It also requires git that is pre-install package in Ubuntu 14.04.

sudo apt-get install nodejs
sudo apt-get install npm
sudo apt-get install git

Next install Bower

npm install -g bower

if you get the error

npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/install'
npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules/install']

try this

sudo npm install -g bower

Then run Bower to check version

bower -version

if you get the error

/usr/bin/env: node: No such file or directory

The reason is that some unix systems install node as nodejs. To fix that, create a symlink

ln -s /usr/bin/nodejs /usr/bin/node

Then, try to check version again