赞
踩
fs.js:133
throw new ERR_INVALID_CALLBACK();
^
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:133:9)
at Object.writeFile (fs.js:1179:14)
at Function.BookGen.processFiles (/Users/jiaolong/workspace/distsysbook/bookgen/generate.js:75:6)
at /Users/jiaolong/workspace/distsysbook/bookgen/generate.js:19:15
at FSReqCallback.args [as oncomplete] (fs.js:145:20)
make: *** [build] Error 1
这个问题是由于node版本引起的,可以通过如下方式进行修复
// fs.write(fd, buf, 0, buf.length, 0, function(err, written, buffer) {}); // node --version < v10.1.0
fs.write(fd, buf, function(err, written, buffer) {}); // node --version > v10.1.0
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。