From e38684a3473fe8f73dd1a65a46ef743dd88abefb Mon Sep 17 00:00:00 2001 From: Ryosuke <37885061+whoisryosuke@users.noreply.github.com> Date: Fri, 2 Aug 2019 16:11:35 -0700 Subject: [PATCH] :bug: Fixes docs build error from Node's fs `fs` from Node now requires a callback for the third parameter, which was missing from the docs Gulp build task file, causing the `gulp build-docs` process to break with the following error: ``` [15:59:18] Starting 'build-docs'... Building Metadata Copying examples Copying LESS source Building Semantic for docs (node:72733) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated. fs.js:113 throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs ^ Error: ENOENT: no such file or directory, open '/Users/username/Development/HTML/docs/out/metadata.json' ITs-MacBook-Pro-6:ksc-ui photoroom$ ./node_modules/gulp/bin/gulp.js build-docs ``` Adding a simple error callback (with optional console log for error reporting) **fixes this issue**. Running the docs build process now works. Not sure if this has already been hashed out for the next release cycle. --- tasks/docs/build.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks/docs/build.js b/tasks/docs/build.js index 8d401b5edb..a840d9da2d 100644 --- a/tasks/docs/build.js +++ b/tasks/docs/build.js @@ -80,7 +80,10 @@ module.exports = function(callback) { gulp.src(config.paths.template.eco + globs.eco) .pipe(map(metadata.parser)) .on('end', function() { - fs.writeFile(output.metadata + '/metadata.json', JSON.stringify(metadata.result, null, 2)); + fs.writeFile(output.metadata + '/metadata.json', JSON.stringify(metadata.result, null, 2), + error => { + console.log("metadata failed", error); + }); }) ;