0

I'm unable to install npm with bower in Ubuntu 12.04.

npm install -g bower
npm ERR! 404 Not Found
npm ERR! 404 
npm ERR! 404 'bower' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Linux 3.5.0-54-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "bower"
npm ERR! cwd /home/rails-dev/my_projects/searchinmena
npm ERR! node -v v0.10.37
npm ERR! npm -v 1.4.28
npm ERR! code E404
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/rails-dev/my_projects/searchinmena/npm-debug.log
npm ERR! not ok code 0

Can anyone help, how I can install this.

karel
  • 114,770
Arvind
  • 153

2 Answers2

1

Maybe you need node (dependency to bower work), verify with:

node -v

If not installed, install node with:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs

Then try install bower with NPM as admin access:

sudo npm install -g bower
1

In case you have upgraded Ubuntu from the end of life 12.04 to 16.04 by now, the installation of Bower has gotten a lot easier. In Ubuntu 16.04 and later Bower package manager can be installed from the Ubuntu Software app. Open Ubuntu Software, search for "bower" and click the Install button to install it. Or open the terminal and type:

sudo snap install --classic bower  
sudo npm install -g bower

enter image description here

karel
  • 114,770