vscode执行npminstall报错(npmERR!code128...raphael.git...)的解决
- 其他
- 2025-08-21 05:30:02

文章目录 vscode执行npm install 报错(npm ERR! code 128)的解决办法问题详情解决办法方法1方法2方法3方法4方法5方法6佛系解决方法 vscode执行npm install 报错(npm ERR! code 128)的解决办法 问题详情
报错信息如下:
npm install npm ERR! code 128 npm ERR! An unknown git error occurred npm ERR! command git --no-replace-objects ls-remote ssh://git@github /nhn/raphael.git npm ERR! command-line line 0: unsupported option "accept-new". 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: 解决办法注意:以下命令在终端执行后,会在 C:\Users\用户名 目录下的.gitconfig文件中保存相应内容,如果某条内容报错,可手动删除.gitconfig中的内容后重新执行。
方法1在项目目录下创建文件: .npmrc ,然后在里面添加如下内容:
sass_binary_site= npm.taobao.org/mirrors/node-sass/ registry= registry.npm.taobao.org接着在vscode的终端执行如下命令:
git config --global url." github /nhn/raphael.git".insteadOf ssh://git@github /nhn/raphael.git 方法2在项目目录下创建文件: .npmrc ,然后在里面添加如下内容:
sass_binary_site= npm.taobao.org/mirrors/node-sass/ registry= registry.npm.taobao.org接着在vscode的终端执行如下2条命令:
git config --global url." github /nhn/raphael.git".insteadOf ssh://git@github /nhn/raphael.git git config --global url." github /adobe-webplatform/eve.git".insteadOf ssh://git@github /adobe-webplatform/eve.git 方法3挂代理:在终端执行如下两条命令
git config --global http.proxy http://127.0.0.1:1080 git config --global https.proxy 127.0.0.1:1080 方法4 在vscode(项目目录)终端执行如下2条命令: git --no-replace-objects ls-remote github pmjs.org/nhn/raphael.git git --no-replace-objects ls-remote github pmjs.org/adobe-webplatform/eve.git 方法5执行如下命令 将ssh 下载变成https:
git config --global url." ".insteadOf ssh://git@ 方法6单独下载
npm install --save raphael 佛系解决方法npm install 多执行几次,或者换个时间执行npm install
参考:npm install 报错,怎么搞? 哪里问题? #3859
vscode执行npminstall报错(npmERR!code128...raphael.git...)的解决由讯客互联其他栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“vscode执行npminstall报错(npmERR!code128...raphael.git...)的解决”
下一篇
TCP/IP网络原理【TCP篇】