npm run dev 报错 iview TypeError [ERR_INVALID_CALLBACK]: Callback must be a function

运行npm run dev报这个错

然后找到 D:\text\vue\iview-admin\build\webpack.dev.config.js打开

将这一行代码:

fs.write(fd, buf, 0, buf.length, 0, function(err, written, buffer) {});

替换为

fs.write(fd, buf, 0, 'utf-8', function(err, written, buffer) {});

保存然后再次执行 npm run dev

posted @ 2018-12-19 11:44  遗失的王者之心  阅读(1613)  评论(0编辑  收藏  举报