npm install 报错解决方法

我相信很多人在执行npm install的时候都遇到各种各样的问题,比如以下错误:

error cb() never called!
error This is an error with npm itself. Please report this error at:
error <https://npm.community>

解决方法如下:

一、首先要以管理员模式打开cmd清除你的npm缓存 : 

   npm cache clean -f

二、清除完缓存后,安装最新版本的Node helper:

npm install -g n --force

三、再执行npm install

npm install 安装报错

error    'Error: EPERM: operation not permitted, lstat ,

44382 error   errno: -4048,
44382 error   code: 'EPERM',
44382 error   syscall: 'lstat',

 error The operation was rejected by your operating system.
 error It's possible that the file was already in use (by a text editor or antivirus),
error or that you lack permissions to access it.

网上其实很多解决方法,我试了都无果,最后找到原因是因为nodejs开启了多个进程导致彼此占用资源引起,结束所有的nodejs进程,重新执行npm install 就可以了。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值