vue踩坑- 报错npm ERR! cb() never called!

在vue项目中引入饿了么elementUI组件的步骤之中,出现以下的错误:

D:\my-project-first>npm i element-ui -S
Unhandled rejection RangeError: Maximum call stack size exceededill install loadIdealTree
    at RegExp.test (<anonymous>)
    at D:\node_modules\npm\node_modules\aproba\index.js:38:16
    at Array.forEach (<anonymous>)
    at module.exports (D:\node_modules\npm\node_modules\aproba\index.js:33:11)
    at flatNameFromTree (D:\node_modules\npm\lib\install\flatten-tree.js:37:3)
    at flatNameFromTree (D:\node_modules\npm\lib\install\flatten-tree.js:39:14)
    at flatNameFromTree (D:\node_modules\npm\lib\install\flatten-tree.js:39:14)
    at flatNameFromTree (D:\node_modules\npm\lib\install\flatten-tree.js:39:14)
    at flatNameFromTree (D:\node_modules\npm\lib\install\flatten-tree.js:39:14)
    at flatNameFromTree (D:\node_modules\npm\lib\install\flatten-tree.js:39:14)
    at flatNameFromTree (D:\node_modules\npm\lib\install\flatten-tree.js:39:14)
    at flatNameFromTree (D:\node_modules\npm\lib\install\flatten-tree.js:39:14)
    at flatNameFromTree (D:\node_modules\npm\lib\install\flatten-tree.js:39:14)
    at flatNameFromTree (D:\node_modules\npm\lib\install\flatten-tree.js:39:14)
    at flatNameFromTree (D:\node_modules\npm\lib\install\flatten-tree.js:39:14)
    at flatNameFromTree (D:\node_modules\npm\lib\install\flatten-tree.js:39:14)

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Program Files\nodejs\node_cache\_logs\2018-08-28T07_04_04_977Z-debug.log

D:\my-project-first>

图片.png

 

解决办法:

尝试 删除项目中的 package-lock.json 文件 和 node_modules 文件夹,然后再尝试 npm install.

 

图片.png

转载于:https://www.cnblogs.com/ting6/p/9725312.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值