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

解决npm ERR! code 128

1.问题描述

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

2.解决方案

在cmd中输入

1

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

解决办法:

执行如下命令:

1

git config --global http.sslverify "false"

再执行 ​​npm install​​

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

1

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

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

1

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

Error: EPERM: operation not permitted问题

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

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值