npm安装依赖超时
2022-08-09 本文已影响0人
R_X
使用新系统安装NPM依赖的时候往往会出现超时的问题,包括但不限于下列错误
npm ERR! code 128
npm ERR! command failed
npm ERR! command git ls-remote ssh://git@github.com/adobe-webplatform/eve.git
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ailjx\AppData\Local\npm-cache\
解决方法:
# 1、 git config --global http.sslverify "false"
# 2、 git config --global url."https://".insteadOf git://
# 3、npm install --registry=https://registry.npm.taobao.org (这个是用来替换NPM库的)