I'm using npm to install web3js:

npm install web3

It eventually fails. Here is the output I get...

npm WARN deprecated [email protected]: â ï¸  WARNING â ï¸ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0:]: errno=Connection timed out
npm ERR! github.com[1:]: errno=Connection timed out

Here is some version info:

uname -a

Linux bde2744830c3 4.1.12-103.7.1.el7uek.x86_64

npm --version 


I've scoured SO and other sites that have somewhat similar postings, but nothing that offers help. I've tried:

npm cache verify 

To no avail.

  • Now it does install correctly [email protected], perhaps it was an issue with github.
    – Ismael
    Commented Nov 17, 2017 at 3:34

1 Answer 1


A very simple solution is to type sudo -i and then sudo npm install web3 It worked for me

  • 1
    You should never use sudo when using npm. Install & use nvm instead. Commented Aug 22, 2018 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.