Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bower will not install packages when .bowerrc exists

I'm trying to install packages using Bower.

Without a .bowerrc file, it works. For example, bower install angular#1.0.6 will install nicely inside ./bower_components.

If there is a .bowerrc with { 'directory' : 'public/javascripts/vendor' }, bower install angular#1.0.6 will not work. Actually, the output of that command is nothing. It simply prints a blank line, then the next line is my terminal prompt. The package is not installed anywhere.

However, if there is an empty .bowerrc file, it will install the package inside ./bower_components.

Why is it not installing the packages and how can I fix it? (so they will install)

Additional info:

No bower command works. bower will fail similarly. bower help too. In fact, bower anything will too.

like image 860
Sparragus Avatar asked Dec 03 '13 04:12

Sparragus


People also ask

Is bower still supported?

While Bower is still maintained, it's recommended to use an alternative package manager instead (npm, Yarn, pnpm, …).

Why bower is deprecated?

Bower has been deprecated by its creatorsAfter a long and heated debate on Github, the creators of Bower decided it does not add value to the current web development stack and should be discontinued.

Where does bower install packages?

Installed packages will be placed in a bower_components directory. This is created in the folder which the bower program was executed. You can change this destination using the configuration options in a . bowerrc file.

When was bower deprecated?

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.


1 Answers

I just solved this. I uninstalled and reinstalled bower, and now it works. :S

sudo npm rm -g bower

sudo npm install bower -g

Now everything works fine!

like image 124
Sparragus Avatar answered Nov 07 '22 19:11

Sparragus