npm install 遇到cb() never called!错误

问题

Vue项目新引入了一个组件,执行npm install报错,具体报错如下
在这里插入图片描述

解决方法

在网上搜罗的各种方法,不外乎以下四种

1、经典连击

(1)npm cache clean -f
(2)npm install -g n(出错后再执行3)
(3)npm install -g n --force
(4)npm stable
(5)npm install

(情况因人而异吧,反正我是没有成功= =)

2、删除对应项目下的node_modules文件夹,以及package-lock.json文件后再次运行npm install

3、配置国内镜像

链接: 配置国内镜像.

4、使用cnpm

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

反正我是一步步搞下来,最后cnpm install的确是都装好了,项目也能正常启动了,但这问题还是很坑,然后又去试了试npm install,好家伙,这下给我换了个错。
This is related to npm not being able to find a file
This is related to npm not being able to find a file
继续找解决方法呗
第一种:npm install -g color-name --unsafe-perm=true(开门大吉,直接成功)
第二种:把对象项目下的node_modules文件夹删除重新npm install,但我想着针对我今天的问题不久套娃了吗,也就没有尝试。但如果仅仅遇到This is related to npm not being able to find a file的问题,可以尝试
第三种:更新node版本
卸载原有的nodejs,换个版本尝试一下
附加链接链接: node历史版本.

另外install过程中也看到不少的警告
this version has been deprecated and is no longer supported or maintain
意思就是 此版本已被弃用,不再受支持或维护
链接: 配置国内镜像.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值