【发布时间】:2019-01-08 20:40:34
【问题描述】:
根据文档,npm install web3 将安装该库,但是当我尝试安装该模块时,它会引发以下错误:
PS F:\Sportist> npm install web3
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 ERR! Error while executing:
npm ERR! C:\Users\aayush.thakur\AppData\Local\Programs\Git\cmd\git.EXE ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git
npm ERR!
npm ERR! fatal: read error: Invalid argument
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\aayush.thakur\AppData\Roaming\npm-cache\_logs\2018-08-01T07_46_08_899Z-debug.log
完整日志:link
【问题讨论】:
-
在cmd而不是powershell上试试
-
在 cmd 上遇到同样的错误。
-
你是否完全卸载了node和npm并重新安装了?
-
您能否确保您已将 Git 安装在正确的位置并分享错误日志?
-
通过环境变量安装并导出Git,添加错误日志。