npm install中报错,该项目是基于vue-admin-template的后台系统

npm ERR! code 128
npm ERR! git dep preparation failed
npm ERR! command D:\rheads\nodejs\node.exe D:\rheads\nvm\v16.13.0\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\Administrator\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 128
npm ERR! npm ERR! A git connection error occurred
npm ERR! npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/adobe-webplatform/eve.git
npm ERR! npm ERR! fatal: unable to access 'https://github.com/adobe-webplatform/eve.git/': Failed to connect to github.com port 443 after 21074 ms: Timed out
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2022-12-28T10_14_51_054Z-debug.log

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2022-12-28T10_15_05_169Z-debug.log

img

这种情况可能是你的node包跟npm版本不匹配,你打开cmd看一下,有可能一个版本高一个版本低,问一下同事看看node需要装哪个版本,然后重新装一下

node和npm都是用nvm去控制管理的

img

node降一下版本试试,降到14.15.0,或者12版本

img

参考我的这篇参坑笔记可以解决你的问题
前端:vue-element-admin 搭建踩坑笔记
https://blog.csdn.net/xishining/article/details/128350462?spm=1001.2014.3001.5502

个人感觉是github网络网问题,给出几个解决方案:
1、使用 yarn 安装试试
2、换个镜像
3、更改github的host,可以查看这个:https://blog.csdn.net/weixin_42728767/article/details/122568179?spm=1001.2014.3001.5502
4、https://github.com/adobe-webplatform/eve.git 下载这个依赖包出了问题,可以尝试下这个方案:报错