Error Installing web3js for Ethereum / Unable to connect to github.com - npm

I'm using npm to install web3js:
npm install web3
It eventually fails. Here is the output I get...
npm WARN deprecated tar.gz#1.0.7: â ï¸ WARNING â ï¸ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
npm WARN deprecated fs-promise#2.0.3: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated minimatch#0.3.0: 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: 192.30.255.113]: errno=Connection timed out
npm ERR! github.com[1: 192.30.255.112]: errno=Connection timed out
Here is some version info:
uname -a
Linux bde2744830c3 4.1.12-103.7.1.el7uek.x86_64
npm --version
5.5.1
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.

It's probably due to the repo url using the git protocol (git://) instead of http. Please make sure you have inbound port 9418 open for it to work.
Hope that helps.

Related

How to install npm live-server?

I am getting the following errors on trying to install npm live-server.
Can someone help.
C:\Users\kacho\Desktop\Web Development\Background Gradient\background-generator>npm install -g live-server
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://registry.npmjs.org/live-server failed, reason: write EPROTO 10472:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\kacho\AppData\Roaming\npm-cache\_logs\2020-04-29T15_34_35_575Z-debug.log
This error appears to be SSL related:
write EPROTO 10472:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:
npm ERR!
Perhaps you could try setting your registry as follows and reinstalling the live-server library like so:
npm config set registry https://registry.npmjs.org/
npm i live-server
As this action ensures you're connecting to npmjs with ssl.
If this doesn't work, you could try removing the ssl requirement and connecting to npmjs as follows:
npm config set registry http://registry.npmjs.org/
npm i live-server
Lastly, if neither of the above mentioned actions work (use at your own discretion) you could disable the ssl requirement altogether by doing the following:
npm config set strict-ssl false
npm i live-server
Hopefully that helps!

npm install host key verification failed

I ran npm install in angular2+ project directory and got below error which I cannot understand at all.
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\bin\git.EXE ls-remote -h -t ssh://git#bitbucket.org/path/projectname.git
npm ERR!
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
I have created ssh key on bitbucket and account and saved it on drive. |
I have clone project from bitbucket.
What does this error has to do with that?
As I am new on project so don't have much knowledge.
Do I need to provide ssh key while npm install as well?
Please let me know if I can provide more info related to question.
Thanks!
Please check the npm version that you are using. Npm comes bundled with node and you shouldn't have multiple instances on your classpath.
Hey yup, I thought as much, but seeing as I had updated npm to the
latest version ( I even uninstalled node and reinstalled ) with the
same result. npm -v still showed the same version - 1.4.9.
FYI for others that may have the same issue. I also have Chocolatey
installed, and it seems that npm was also installed via Chocolately
which seems to overide the npm path. Uninstalling npm from Chocolately
resolved the npm version issue.
After that angular/cli installs correctly from npm.
https://github.com/angular/angular-cli/issues/6313#issuecomment-301360623

I Can't install Web3

I have to install Web3 which is a ethereum library but I can't install in linux mint 18.
$ sudo npm install web3 --save
[sudo] password for taylor:
npm WARN deprecated fs-promise#2.0.3: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated tar.gz#1.0.7: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/taylor/.npm/_logs/2018-02-01T12_55_24_014Z-debug.log
What can I do?
The error clearly states that you are missing git.
Try installing git first and give it a go ?

Unable to install vue-cli using npm

I have installed the latest version of npm and with that, I am trying to install vue-cli using the command
npm install --global vue-cli
But I am running into issues stated below:
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to http://registry.npmjs.org/vue-cli failed, reason: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:827:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\pd0ufv\AppData\Roaming\npm-cache\_logs\2018-02-02T17_02_16_113Z-debug.log
I have set my proxy setting as well using
npm set http-proxy <proxy>
npm set https-proxy <proxy>
but didn't work as well. I am using npm version 5.6.0.
Most of the time this error is because the firewall you're behind doesn't actually support SSL peering but will mimic it if you use their http passthrough, so change your https-proxy definition accordingly:
npm set https-proxy http://example.com
Use following steps :
npm cache clean --force
npm install -g #vue/cli

react-native init AwesomeProject unable to connect to github.com

I followed the tutorial posted by facebook. Getting startted https://facebook.github.io/react-native/docs/getting-started.html#content
however, when I run react-native init AwesomeProject, I only get the following errors. My node.js is v4.1.0, npm is v2.14.3.
I don't know if my environment is ok or it just can not connect to github.com?
npm ERR! git clone --template=/Users/jansenli/.npm/_git-remotes/_templates --mirror git://github.com/facebook/react.git /Users/jansenli/.npm/_git-remotes/git-github-com-facebook-react-git-baa2986b: fatal: unable to connect to github.com:
npm ERR! git clone --template=/Users/jansenli/.npm/_git-remotes/_templates --mirror git://github.com/facebook/react.git /Users/jansenli/.npm/_git-remotes/git-github-com-facebook-react-git-baa2986b: github.com[0: 192.30.252.129]: errno=Operation timed out
npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/jansenli/.nvm/versions/node/v4.1.0/bin/node" "/Users/jansenli/.nvm/versions/node/v4.1.0/bin/npm" "install" "--save" "react-native"
npm ERR! node v4.1.0
npm ERR! npm v2.14.3
npm ERR! code 128
npm ERR! Command failed: git clone --template=/Users/jansenli/.npm/_git-remotes/_templates --mirror git://github.com/facebook/react.git /Users/jansenli/.npm/_git-remotes/git-github-com-facebook-react-git-baa2986b
npm ERR! Cloning into bare repository '/Users/jansenli/.npm/_git-remotes/git-github-com-facebook-react-git-baa2986b'...
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.252.129]: errno=Operation timed out
npm ERR!
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /Users/jansenli/AwesomeProject/npm-debug.log
npm install --save react-native failed
First - check if you can actually see github website at all. Just go to https://github.com/facebook/react and you should see the react project. If you can see, that's already good :).
The error messages indicate however that you have problem with downloading the repo via git://github.com/facebook/:react.git. You can validate that by running:
git clone git://github.com/facebook/react.git
It should hang and you should get timeout as well.
If you cannot connect with git:// and if at the same time you can connect to github via https - my wild guess is that you have firewall blocking git protocol via port 9418 connections to github (more about the git protocol here: https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#The-Git-Protocol). You get timeout, which is pretty standard behaviour if you are behind company firewall.
If that's the case, then there are few options. First - bypass the firewall - like do it from home or something ... If you cannot do it however, then you can try to let git always use https:// instead of git://. Apparently those two commands will configure git in this way (I have not tried it, but it should work):
git config --global url."https://github.com/".insteadOf git#github.com:
git config --global url."https://".insteadOf git://
Likely only the first command should be enough (but I am not 100% sure if it is).