8

When I just installed bootstrap-css with bower install I got this message to update bower from 1.2.8 to 1.3.1

$ bower install bootstrap-css
-----------------------------------------
Update available: 1.3.1 (current: 1.2.8)
Run npm update -g bower to update
-----------------------------------------

So I ran it and this is what happened

$ npm update -g bower
npm http GET https://registry.npmjs.org/bower
npm http 304 https://registry.npmjs.org/bower

$ bower --version
1.2.8

I'm still on 1.2.8. How come bower is not updating?

  • 2
    Maybe you should remove bower and install it again. – Fernando Vieira Jun 04 '14 at 14:15
  • 1
    Yes that is what I did and it worked. https://github.com/npm/npm/issues/5248#issuecomment-45222702 Not an elegant solution though. –  Jun 05 '14 at 14:06
  • possible duplicate of [Problems updating bower to the latest version](http://stackoverflow.com/questions/22585790/problems-updating-bower-to-the-latest-version) – andyrandy Apr 14 '15 at 09:03

4 Answers4

17

You need to update bower by running the following command:

npm install -g bower@latest
MAK
  • 575
  • 1
  • 10
  • 23
Laurent
  • 523
  • 6
  • 15
2

You can use this command

npm update bower -g
flyingduck92
  • 1,449
  • 2
  • 23
  • 39
0

Interestingly npm update -g bower was updating my bower to the latest but when I was checking the version with bower --version, it showed me the old version. I removed the old package from .npm/bower/ and then it recognized the new version!

mohi
  • 1,093
  • 2
  • 16
  • 21
0

If anyone is having this problem on Windows and has Visual Studio 2015 installed, you will need to go to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External and rename bower.cmd to bower.cmdBAK.

Before doing that, running bower --version was always returning 1.3.9 for me when I knew from running npm ls -g | grep bower that I was at 1.6.5 globally.

Barrie
  • 1,444
  • 19
  • 26