the code in es6-init.js fails to find the correct package.json when it is called from another node-module that has been installed via nvm.
In this case, findPackageJson will walk up all the way to the .nvm directory, and subsequently electron-compile will find a .cache directory there, which is not meant for it. Then it crashes.
Scenario:
I have a project using electron-prebuilt-compile
I call electron with electron-mocha, like this:
ELECTRON_PATH=./node_modules/.bin/electron electron-mocha ./test
This fails with:
App threw an error during load
Error: ENOENT: no such file or directory, open '/Users/wodev/.nvm/.cache/compiler-info.json.gz'
Analysis:
electron-mocha ends up calling electron with a path like below:
$HOME/.nvm/versions/node/v8.1.2/lib/node_modules/electron-mocha/index.js
Since findPackageJson skips over everything under a node_modules folder, it ends up in the nvm home directory.
Hello,
the code in es6-init.js fails to find the correct package.json when it is called from another node-module that has been installed via nvm. In this case, findPackageJson will walk up all the way to the .nvm directory, and subsequently electron-compile will find a .cache directory there, which is not meant for it. Then it crashes.
Scenario: I have a project using electron-prebuilt-compile I call electron with electron-mocha, like this: ELECTRON_PATH=./node_modules/.bin/electron electron-mocha ./test
This fails with: App threw an error during load Error: ENOENT: no such file or directory, open '/Users/wodev/.nvm/.cache/compiler-info.json.gz'
Analysis: electron-mocha ends up calling electron with a path like below: $HOME/.nvm/versions/node/v8.1.2/lib/node_modules/electron-mocha/index.js
Since findPackageJson skips over everything under a node_modules folder, it ends up in the nvm home directory.