npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t https://github.com/nhn/raphael.git
npm ERR!
npm ERR! error: RPC failed; curl 28 OpenSSL SSL_read: Connection was reset, errno 10054
npm ERR! fatal: expected flush after ref listing
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\A5\AppData\Roaming\npm-cache\_logs\2021-04-02T03_09_33_014Z-debug.log
1 可能有些依赖使用ssh的方式已经不能下载,需要替换成https方式或git方式
git config --global url."https://".insteadOf git://
git config --global url."git://".insteadOf https://
然后重新执行npm install
2.更换淘宝镜像,命令
npm config set registry https://registry.npm.taobao.org
3 添加host (不能用)
这两种方法都使用过,结果还是不行,最终解决办法是通过修改Hosts 解决,在hosts文件追加如下内容。
此方法同样来自网络,但是搜索报错信息却找不到此解决方法,特此记录。
140.82.112.4 github.com
140.82.113.3 gist.github.com
185.199.108.153 assets-cdn.github.com
199.232.68.133 raw.githubusercontent.com
199.232.68.133 gist.githubusercontent.com
199.232.68.133 cloud.githubusercontent.com
151.101.192.133 camo.githubusercontent.com
199.232.68.133 avatars0.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars3.githubusercontent.com
199.232.68.133 avatars4.githubusercontent.com
199.232.68.133 avatars5.githubusercontent.com
199.232.68.133 avatars6.githubusercontent.com
199.232.68.133 avatars7.githubusercontent.com
199.232.68.133 avatars8.githubusercontent.com
4
还是不行
通过下载包的形式拉下代码。而不是通过命令(git clone) 。然后在执行 就可以 npm install
参考: