From d5a1bccdc6e80ae324e457d9a4cdfe5f0698494d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=BCsel?= Date: Wed, 18 Nov 2020 23:19:26 +0100 Subject: [PATCH] Add fix for building against node 10 and 11 (#48) --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 005d8ab..1ca7515 100644 --- a/index.js +++ b/index.js @@ -189,6 +189,9 @@ function build (target, runtime, opts, cb) { if (runtime === 'electron') { args.push('--runtime=electron') args.push('--dist-url=https://atom.io/download/electron') + } else if (runtime === 'node' && [10, 11].some(buggedMajor => +target.split('.')[0] === buggedMajor)) { + // work around a build bug in node versions 10 and 11 https://github.com/nodejs/node-gyp/issues/1457 + args.push('--build_v8_with_gn=false') } if (opts.debug) {