使用 npm install安装依赖时报错 npm ERR! Error while executing

问题描述:vue-element-admin使用 npm install安装依赖时报错 npm ERR! Error while executing

npm ERR! Error while executing:
npm ERR! H:\Program Files\git\Git\cmd\git.EXE ls-remote -h -t https://github.com/nhn/raphael.git
npm ERR!
npm ERR! fatal: unable to access 'https://github.com/nhn/raphael.git/': Recv failure: Connection was reset
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR!     H:\Program Files\nodejs\node_cache\_logs\2023-03-02T01_25_58_031Z-debug.log

解决办法1:(没有解决我的问题)
执行如下命令:

git config --global http.sslverify "false"

再执行 npm install 就可以了

如果上述命令执行完后,还是报那个错误,请继续执行如下命令,亲测有效

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

解决办法2:(解决了我的问题!!!)
1.tui-editor引起的报错,先删除package.json的 tui-editor配置项,再运行npm install或者 yarn install会正常编译。
2.在手动安装 tui-editor

npm install --save tui-editor

参考文章:https://blog.csdn.net/m0_67401545/article/details/125345739

tui-editor可能会安装不成功,查阅发现是原先的tui-editor换了个名称,现在已经更名为toast-ui/editor因此安装不了,从而报错!

参考文章:https://blog.csdn.net/Apple0631/article/details/128723163

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值