在运行npm install下载之后报如下错误:
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
``
最后整理了一下,在window和linux 上如何解决这个问题
Linux:
以管理员模式打开cmd清除你的npm缓存 (mac电脑在npm前加sudo):
npm cache clean -f
清除完缓存后,安装最新版本的Node helper:
npm install -g n
然后安装npm包管理助手
npm install -g n --force
用n助手安装最新的稳定版的node
n stable
Window:
刚开始按照上面的操作了一边最后在执行 n stable 时出现bash不是内部不命令,查看文件夹之后发现 n 是一个shell脚本,在命令行执行不了
1.先使用:npm cache verify
2.在使用:npm cache clean
3.可能需要:npm cache clean -—force
重新进行安装需要的包即可