Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm install web3 Install fails: undefined ls-remote

Installation Environment

win7 64bit

I:\nodejs>node -v

v10.13.0

I:\nodejs>npm -v

6.4.1

I:\nodejs>npm install web3

npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated [email protected]: ⚠️  WARNING ⚠️ tar.gz module has been deprecated and your appli
npm ERR! code ENOGIT
npm ERR! Error while executing:
npm ERR! undefined ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git
npm ERR!
npm ERR! undefined
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!     C:\Users\lenovo\AppData\Roaming\npm-cache\_logs\2018-11-11T09_18_45_834Z-debug.log

I have never encountered such a problem, and I have not found any clues on google.

thanks in advance

like image 501
pangjiale Avatar asked Nov 11 '18 09:11

pangjiale


1 Answers

npm ERR! code ENOGIT
npm ERR! Error while executing:
npm ERR! undefined ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git
npm ERR!
npm ERR! undefined
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.

Those lines tells you that the problem is the missing git. Here is your solution.

like image 154
lependu Avatar answered Oct 13 '22 00:10

lependu