0

I have been trying to install bower globally using this command:

 sudo npm install -g bower

When I do I enter my password and I get a loading spinning bar. It stays like this for a few minutes then outputs these errors:

Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! node v0.12.3
npm ERR! npm  v2.9.1
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! syscall connect

npm ERR! network connect ETIMEDOUT
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

Not sure whats going on. Is the Node and NPM out of date?

Packy
  • 3,405
  • 9
  • 50
  • 87
  • 1
    First of all, you shouldn't ever need `sudo` to install a global npm package. [Fix the permissions.](http://stackoverflow.com/a/16151707/1276128) Your versions of node and npm are not out of date, as you can see there is an error `ETIMEDOUT` -> Timed Out. It's hard to debug internet connection as is, especially if we don't have more info on what is happening. Try to install some other module via npm and see if you get the same error. If you do, there is an connection problem on your side. I can assure you it's not a problem with npm, since I tried to install bower just now and it worked. – Marko Gresak Jun 30 '15 at 16:48
  • Well... "...is related to network connectivity.". Make sure the firewall isn't blocking the request, or you're not behind a badly configured proxy. – eselskas Jun 30 '15 at 16:50
  • So I tried the non sudo install and got the same errors after fixing the permissions. I have not had an issue installing other packages such as Gulp. – Packy Jun 30 '15 at 17:11

1 Answers1

0

I got this to work by simply trying it from a different location and changing my permissions using this post. Seems to maybe just my network.

Community
  • 1
  • 1
Packy
  • 3,405
  • 9
  • 50
  • 87