Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Bower on Ubuntu

Tags:

npm

bower

I'm trying to install Bower on XUbuntu 13.10, following the instructions on the Bower home page, after doing sudo apt-get install npm and sudo npm install -g bower I get the following after issuing bower on the command line:

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

I then install Node (even though I assume that would not be unnecessary since Bower's only dependency would be NPM, correct?). Anyhow, after I install node with sudo apt-get install node any of the Bower commands, such as bower help, simply don't do anything, i.e. output nothing.

How to install Bower on Ubuntu (preferably without manually downloading various versions of things)?

like image 957
Luke Avatar asked Oct 09 '22 18:10

Luke


People also ask

Is bower still used?

The Bower package was last released in 2014 and after that, the official has announced to give up that package. It is just left as an outdated product on Nuget. So you do not need to install that package but to use the new package just as I recommend. Can 'LibMan' be used?

How does bower install work?

Bower doesn't concatenate or minify code or do anything else - it just installs the right versions of the packages you need and their dependencies. To get started, Bower works by fetching and installing packages from all over, taking care of hunting, finding, downloading, and saving the stuff you're looking for.

Can I use npm instead of bower?

In almost all cases, it's more appropriate to use Browserify and npm over Bower. It is simply a better packaging solution for front-end apps than Bower is. At Spotify, we use npm to package entire web modules (html, css, js) and it works very well.


1 Answers

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

or install legacy nodejs:

sudo apt-get install nodejs-legacy

As seen in this GitHub issue.

like image 86
NiL Avatar answered Oct 19 '22 00:10

NiL