我跑了npm i -g @vue/cli
。然后,我尝试使用vue create test
创建一个新项目,但始终出现此错误:
NPM错误! cb()从未调用过!
NPM错误! 这是npm本身的错误。请报告此错误 在: npm错误! https://npm.community
NPM错误! *此运行的完整日志可在以下位置找到:* npm ERR!
C:\ Users \ HP \ AppData \ Roaming \ npm-cache_logs \ 2020-07-22T11_49_02_861Z-debug.logERROR命令失败:npm install --loglevel错误
答案 0 :(得分:1)
尝试清理缓存。
const app = require('express')();
const util = require('util');
const myService = require('./myService');
const myServiceInit = util.promisify(myService.init);
Promise.all([myServiceInit]).then(() => {
// delayed listening of your app
app.listen(2000);
}).catch(err => {
// handle error here
});