问题描述: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

Logo

基于 Vue 的企业级 UI 组件库和中后台系统解决方案,为数万开发者服务。

更多推荐