Bower install hangs
Asked Answered
G

3

18

I am trying to install packages with bower. No matter what package I seem to try to install, bower outputs nothing and hangs. The verbose flag does not give more information.

strace outputs a long series of:

gettimeofday({1401644126, 563885}, NULL) = 0
gettimeofday({1401644126, 563944}, NULL) = 0
futex(0xb720046c, FUTEX_WAKE_PRIVATE, 1) = 1

And lsof outputs:

strace  19125 matt  rtd    DIR    8,6     4096       2 /
strace  19125 matt  txt    REG    8,6   264024 3550363 /usr/bin/strace
strace  19125 matt  mem    REG    8,6  1758972  263074 /lib/i386-linux-gnu/libc-2.19.so
strace  19125 matt  mem    REG    8,6   134380  264066 /lib/i386-linux-gnu/ld-2.19.so
strace  19125 matt    0u   CHR 136,15      0t0      18 /dev/pts/15
strace  19125 matt    1u   CHR 136,15      0t0      18 /dev/pts/15
strace  19125 matt    2u   CHR 136,15      0t0      18 /dev/pts/15

npm is version 1.4.13 and bower is 1.3.3.

The expected behavior is that the package be installed. Any idea what is happening?

Gormandize answered 1/6, 2014 at 17:39 Comment(0)
G
16

I believe this problem is fixed by commit 23fbbb51915d532a23ce0faafcc140663fbc008e.

Re-installing bower from master fixed the problem:

sudo npm install -g git://github.com/bower/bower#master
Gormandize answered 2/6, 2014 at 6:17 Comment(0)
A
16

In my case it was not working well with the git protocol (which uses port 9418 was blocked). I ended up forcing git to use https.

git config --global url.https://.insteadOf git://

now it works. Hope this helps someone.

Airframe answered 18/3, 2015 at 17:31 Comment(0)
G
5

I know this is an old issue but I was having the same problem today using bower to install angular sanitize, and wanted to add my two cents, in case someone has this issue again. Not sure if this is the best solution but it worked. I added the force flag

bower install --force

you can also try before:

bower cache clean

bower cache list

Also I deleted the libraries that bower had pulled in previously

Goggin answered 15/7, 2016 at 14:23 Comment(1)
Thats how I solved my problem too (one dependency responded with 504). Here's a detailed explanation: github.com/bower/bower/issues/1899#issuecomment-308363902Penthouse

© 2022 - 2024 — McMap. All rights reserved.