npm install报错code128

报错内容

npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/adobe-webplatform/eve.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 140.82.114.3]: errno=Unknown error
npm ERR!
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:

原因分析:
百度了很多原因,大多数都是两种可能:①没有ssl证书 ②不支持git下载。我这里就是第二个原因。

解决方法:
② 把 git:// 替换成https://

git config --global url."https://".insteadOf git://

猜你喜欢

转载自blog.csdn.net/qq_37291367/article/details/121231244
今日推荐