Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

npm update -g bower does not update bower #5248

Closed
siddhion opened this Issue · 6 comments

2 participants

@siddhion

I ran bower init and saw a message to update to bower 1.3.3

$ bower init
-----------------------------------------
Update available: 1.3.3 (current: 1.2.8)
Run npm update -g bower to update
-----------------------------------------

I tried to do that and it did not work. How can I get global bower to update?

$ sudo npm update -g bower
[sudo] password for max: 
npm http GET https://registry.npmjs.org/bower
npm http 304 https://registry.npmjs.org/bower

$ bower -g -v
1.2.8
@bfred-it

I've been having the exact same issue. Won't update from 1.2.8 to 1.3.3

I tried uninstalling it but it won't do that either. I feel that it's a configuration issue.

bfred@fb /> npm uninstall -g bower
npm WARN uninstall not installed in /Users/bfred/.node/lib/node_modules: "bower"

bfred@fb /> which bower
/usr/local/bin/bower

bfred@fb /> echo $PATH
/usr/bin /bin /usr/sbin /sbin /usr/local/bin /Users/bfred/bin /Users/bfred/.node/bin
@siddhion

I tried uninstalling

$ sudo npm uninstall -g bower
[sudo] password for max: 
unbuild bower@1.3.3

it says unbuild bower@1.3.3 but I had 1.2.8. Very confusing. When I reinstalled this is what I got:

https://gist.github.com/siddhion/5d8639697b631910e963

On line 323-324 I see

/usr/bin/bower -> /usr/lib/node_modules/bower/bin/bower
bower@1.3.3 /usr/lib/node_modules/bower

So bower@1.3.3 seems to be getting installed but when I check the version I get

$ bower --version
1.2.8

Still at 1.2.8. Any ideas?

@siddhion

Well I fixed this manually. Here is what I did.

First I tried uninstalling

$ sudo npm uninstall -g bower
[sudo] password for max: 
unbuild bower@1.3.3

It says it unbuilt version 1.3.3 ok. So more verification I had 1.3.3 and not 1.2.8. I then decided to check if bower really bounced

$ bower --version
1.2.8

$ which bower
/usr/local/bin/bower

Ehh. Guess not so I went in manually to clean it out by going into /usr/local/bin/bower
and finding out where the symbolic link was pointing to so

$ ls -l
total 2844
lrwxrwxrwx 1 root root      35 Jan 17 02:09 bower -> ../lib/node_modules/bower/bin/bower

I deleted the symbolic link with sudo rm bower and traveled to /usr/local/lib/node_modules/bower/bin and ran sudo rm -rf bower/
. Bye bye bower.

$ bower --version
bash: /usr/local/bin/bower: No such file or directory

Now I just had to reinstall bower with `sudo npm install -g bower' but when I checked to see if the new globally installed bower was there I got

$ bower --version
bash: /usr/local/bin/bower: No such file or directory

I just had to open a new terminal and finally success

$ bower --version
1.3.4

Not a true fix but hope that helps some frustrated people out there.

@bfred-it

Yep, that fixed it for now:

rm /usr/local/bin/bower
npm install -g bower
@siddhion

Not sure if this calls for a closing of this issue as the problem was not fully solved. This is just a manual work around. What do you think?

@bfred-it

The problem was probably in our own configuration, so it can be closed. If anyone has the same problem they'll find this and fix it themselves.

@siddhion siddhion closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.