npm 执行报错 git.EXE ls-remote -h -t https://github.com/nhn/raphael.git :
npm ERR! Error while executing:
npm ERR! d:\Program Files\Git\cmd\git.EXE ls-remote -h -t https://github.com/nhn/raphael.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
npm ERR! A complete log of this run can be found in:
npm ERR! D:\Program Files\nodejs\node_cache\_logs\2022-05-11T03_24_25_356Z-debug.log
使用 https 替换 git :
git config --global url."https://".insteadOf git://
如果方法1不行,可能是依赖包没下载全,按 npm install无法生成node_modules的解决方法 进行处理。
终极大法,将能够编译正确的同事电脑上的 node_modules 包拷贝过来吧!