diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ae1926ed5..0a97ac23ce 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -117,7 +117,6 @@ jobs: command: | brew uninstall --ignore-dependencies node HOMEBREW_NO_AUTO_UPDATE=1 brew install node@8 - yarn global add node-gyp - *attach_workspace - *test_build - *test_run @@ -130,7 +129,6 @@ jobs: brew uninstall --ignore-dependencies node HOMEBREW_NO_AUTO_UPDATE=1 brew install node@6 brew link --force node@6 - yarn global add node-gyp - *attach_workspace - *test_build - *test_run diff --git a/src/util/execute-lifecycle-script.js b/src/util/execute-lifecycle-script.js index b89d002355..ae09f86dd5 100644 --- a/src/util/execute-lifecycle-script.js +++ b/src/util/execute-lifecycle-script.js @@ -137,6 +137,10 @@ export async function makeEnv( pathParts.unshift( path.join(path.dirname(process.execPath), '..', 'lib', 'node_modules', 'npm', 'bin', 'node-gyp-bin'), ); + // Include node-gyp version from homebrew managed npm, if available. + pathParts.unshift( + path.join(path.dirname(process.execPath), '..', 'libexec', 'lib', 'node_modules', 'npm', 'bin', 'node-gyp-bin'), + ); // Add global bin folder if it is not present already, as some packages depend // on a globally-installed version of node-gyp.