npm ERR! code 128的错误问题解决方法

解决npm ERR! code 128

1.问题描述

在使用npm install时提示以下错误:

2.解决方案

在cmd中输入

npm cache clean --force

在重新npm install即可

补充:npm install报错 code:128 和 Error: EPERM: operation not permitted 

报错:

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\_logs\2021-07-19T06_15_12_290Z-debug.log

解决办法:

执行如下命令:

git config --global http.sslverify "false"

再执行 ​​npm install​​

如果上述命令执行完后,还是报那个错误,继续执行如下命令

git config --global url."https://".insteadOf git://

可以通过如下操作解决 npm 下载速度慢的问题

npm install --registry=https://registry.npm.taobao.org

Error: EPERM: operation not permitted问题

删除​​C:\Users\用户名\.npmrc​​ 文件就ok

作者:ZNineSun原文地址:https://blog.csdn.net/zhiyikeji/article/details/114364975

%s 个评论

要回复文章请先登录注册