npm 安装 elementUI 踩坑- 报错npm ERR! cb() never called!

来源:https://blog.csdn.net/qq_38822390/article/details/82188365

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

D:\my-project-first>npm i element-ui -S
Unhandled rejection RangeError: Maximum call stack size exceededill install loadIdealTree
    at RegExp.test ()
    at D:\node_modules\npm\node_modules\aproba\index.js:38:16
    at Array.forEach ()
    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!     

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>

npm 安装 elementUI 踩坑- 报错npm ERR! cb() never called!_第1张图片

图片.png

解决办法:

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

 

npm 安装 elementUI 踩坑- 报错npm ERR! cb() never called!_第2张图片

你可能感兴趣的:(vue)