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?
To solve the issue, try removing the entire node_modules/ folder and the package-lock. json file. Then try running the npm install command again. That may fix the issue.
Bower depends on Node. js and npm. Also make sure that git is installed as some bower packages require it to be fetched and installed.
To install Bower on Windows, you are required to install NPM (Node Package Manager) first. Using NPM, we can easily install the Bower front-end package manager. If you have installed NPM on windows, you can use the “npm install -g bower” command in the command prompt to install Bower on windows.
The npm install installs all modules that are listed on package. json file and their dependencies. npm update updates all packages in the node_modules directory and their dependencies.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With