From f6a18e18dbf579fa5bb938f41e54406b48853e53 Mon Sep 17 00:00:00 2001 From: Jared Allard Date: Fri, 8 Apr 2016 09:44:13 -0700 Subject: [PATCH] npm/exe: check for lib/internal/boostrap_node.js, npm 1.1.2 fixes #207 --- lib/exe.js | 7 ++++++- package.json | 2 +- test/express-test/package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/exe.js b/lib/exe.js index 4f369de..4dd41c0 100644 --- a/lib/exe.js +++ b/lib/exe.js @@ -659,6 +659,11 @@ function _monkeyPatchGyp(compiler, complete) { function _monkeyPatchMainJs(compiler, complete) { var mainPath = path.join(compiler.dir, "src", "node.js"); + if(!fs.existsSync(mainPath)) { + _log('warn', 'src/node.js doesn\'t exist. Trying \'lib/internal/bootstrap_node.js\'') + mainPath = path.join(compiler.dir, "lib/internal", "bootstrap_node.js"); + } + _monkeypatch( mainPath, function(content) { @@ -701,7 +706,7 @@ function _monkeyPatchChildProcess(compiler, complete) { function _monkeyPatchMainCc(compiler, complete) { let finalContents; - + let mainPath = path.join(compiler.dir, "src", "node.cc"); let mainC = fs.readFileSync(mainPath, { encoding: 'utf8' diff --git a/package.json b/package.json index 5547db4..72ea79b 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "nexe", "description": "create single executables out of your [node/io].js applications", "license": "MIT", - "version": "1.1.1", + "version": "1.1.2", "contributors": [ { "name": "Criag Condon", diff --git a/test/express-test/package.json b/test/express-test/package.json index d1821da..8741e80 100644 --- a/test/express-test/package.json +++ b/test/express-test/package.json @@ -21,7 +21,7 @@ "debug": false, "runtime": { "framework": "node", - "version": "5.7.0", + "version": "5.10.0", "ignoreFlags": true } }