1.VUE 初始化 npm install 报错npm ERR! cb()never called!
npm ERR! cb() never called!
npm ERR! This is an error withnpm itself. Please report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! A complete log of thisrun can be found in:
npm ERR!C:\Users\AppData\Roaming\npm-cache_logs\2017-12-15T13_53_25_178Z-debug.log
解决办法:
尝试 删除项目中的 package-lock.json 文件 和 node_modules 文件夹,然后再尝试 npm install.
如果上述操作后依旧报错,请尝试卸载node 及删除C:\Users\AppData\Roaming\npm-cache和npm 文件夹后重新安装node.并配置环境变量(百度搜索node环境变量配置有很多文章我就不啰嗦了)
2. VUE 初始化 npm install 报错 .NETFramework 2.0 SDK 文件找不到,请去微软官网下载这个文件 依旧百度搜索(.NETFramework 2.0 SDK 下载)安装后 再进行 npm install.
3. VUE 初始化 npm install 如果你尝试了以上所有办法 报其他错误的情况下 可以考虑是否是网络不好,可以尝试使用cnpm 。
执行npm install -g cnpm --registry=https://registry.npm.taobao.org
安装成功后就可以 将npm改成使用cnpm安装模块了