01-1 npm ERR! exited with error code: 128

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

参考:

https://huaweicloud.csdn.net/639fe734dacf622b8df8f511.html?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2~default~CTRLIST~activity-1-122251403-blog-123220744.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2~default~CTRLIST~activity-1-122251403-blog-123220744.pc_relevant_default&utm_relevant_index=1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值