用npm安装依赖报错:
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-12-16T07_38_47_793Z-debug.log
解决方法:
一、清除npm缓存
删除已经安装一部分的node_modules文件夹,执行下面命令行:
npm cache clean -force
然后再次安装(npm install)
二、升级node版本
可以直接去node官网下载最新版本,也可以使用node包管理器 n
(记得删除已经安装的node_modules文件夹)
三、删除代理
删除已经安装一部分的node_modules文件夹,执行下面命令行:
npm config rm proxy
npm config rm https-proxy
然后再次安装(npm install)