Stuck on installing dependencies with bower (found

2019-06-27 09:34发布

问题:

I followed this guide to install foundation on my Windows 8.1 PC.

http://foundation.zurb.com/forum/posts/11597-how-to-install-grunt-and-libsass-on-windows

When I get to Step 16 my cmd prompt gets stuck on "Installing dependencies with bower...".

I have had foundation work on my computer before but I recently had to reformat it. Thanks for any help.

回答1:

I spent a lot of time trying to fix this problem... and I have solution! :) I think it's a problem between node.js and npm versions. I noticed that when I have newest node.js I don't have problem with npm ERR! when I start in CMD npm install -g bower and then run foundation new project_name --libsass I notice the "Installing dependencies with bower..." process goes on and on ....

However, when I installed node.js version 0.10.x and create a new Foundation project, the "Installing dependencies with bower..." works properly but I have an npm ERR! (and earlier when typing "npm install -g bower").

Conclusion:

  1. If you have node.js version > 0.10.x uninstall it and restart computer.
  2. Install node.js version 0.10.x (I have node-v0.10.9-x86) and restart computer.
  3. Upgrade npm to latest version. Good tutorial how to do it here: https://github.com/npm/npm/wiki/Troubleshooting in section "Upgrading on Windows" and restart computer.
  4. Check your npm version: open CMD and typing it "npm -v", if you see npm 2.5.1 or later (for future) you successfull updated npm...
  5. Install everything else as-per: http://foundation.zurb.com/forum/posts/11597-how-to-install-grunt-and-libsass-on-windows

Hope it helps! Arcady

P.S. I have Windows 64-bit, I installed rubyinstaller-1.9.3-p551, and newest Git version...



回答2:

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



回答3:

I have the same problem and did a Ctrl+C to stop installing dependencies with bower. Then did bower update command while in the directory where my website was and it finished adding all the correct files.



回答4:

Hello I got the same problem. Try to clear bower cache it solved my problem

bower cache clean

bower cache list

Hope it helped you



回答5:

I reinstalled bower globally, and it worked.

npm install -g bower



回答6:

i have the same problem. I'm on windows 8.1 x64. Tried: Cleaning bower cache, added bower to environment path, reinstalled node.js. I didn't found a resolution but you can try this:

  1. Download this starter compass project and unzip it
  2. Copy the files to Your project folder.
  3. In CMD go to your project directory and Run "bower install" to install the latest version of Foundation.
  4. Next run "compass watch".
  5. Now open index.html