playcanvas / developer.playcanvas.com

Developer resources website for PlayCanvas
https://developer.playcanvas.com/
MIT License
68 stars 41 forks source link

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function #67

Closed gq13965786 closed 5 years ago

gq13965786 commented 5 years ago

node build.js come with this error done is printed but it looks like wiith err in m.build

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function at maybeCallback (fs.js:129:9) at Object.write (fs.js:536:14) at Ware. (F:\developer.playcanvas.com-stable\lib\contents-json\in dex.js:200:16) at Ware. (F:\developer.playcanvas.com-stable\node_modules\wrap-fn\index.js:45:19) at Immediate.next (F:\developer.playcanvas.com-stable\node_modules\ware\lib\ index.js:85:20) at Immediate. (F:\developer.playcanvas.com-stable\node_modules\wr ap-fn\index.js:121:18) at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5) at processImmediate (timers.js:658:5)

gq13965786 commented 5 years ago

could you also provide the tool to distribute game to both ios and andriod.

willeastcott commented 5 years ago

I have reproduced this problem myself. @daredevildave - so an exception appears to be thrown inside Metalsmith. Any idea what could cause this? BTW, looks like the packages referred to in the package.json are now pretty out of date, which spams a lot of warnings on install. Would be good to bring them up to date.

willeastcott commented 5 years ago

I fixed this problem in 767bf6dd3196248259243ef7dcb1975e76b24dd7. In newer versions of node, fs.write needs a third callback parameter.