在使用vue开发时,npm安装插件依赖包时,出现以下错误 npm ERR! Error while executing: npm ERR! E:\Git\cmd\git.EXE ls-remote -h -t git://github.com/adobe-webplatform/eve.git npm ERR! fatal: remote error:
大概的意思就是无法链接远程链接,可能是某个依赖包链接地址换了导致了解决办法是设置git配置协议
npm ERR! Error while executing: npm ERR! E:\Git\cmd\git.EXE ls-remote -h -t git://github.com/adobe-webplatform/eve.git npm ERR! npm ERR! fatal: remote error: npm ERR! The unauthenticated git protocol on port 9418 is no longer supported. npm ERR! Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information. npm ERR! npm ERR! exited with error code: 128
解决办法:
git config --global url."https://".insteadOf git://
重新npm install
另外有的依赖是另外git协议那就要换成:
git config --global url."git://".insteadOf https://
反过来配置