-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pre-gyp looks for the wrong ABI in electron childProcess.forks #278
Comments
any update for this issue? I need this pull request |
I create a pull request for this issue |
This is my original PR to close this: #279 Open to either solution, but I think we should aim to make this work without user provided env vars. |
This should be resolved, however I haven't personally tested. |
Confirmed that updating to Electron v6 (currently in beta) fixed the issue for me. E.g. I am able to use node-sqlite3 from an Electron-forked process. |
@awohletz that's great news thank you for the info! |
It appears node-pre-gyp modules are trying to use the wrong ABI when run inside of a childProcess.fork from an electron process, even if you have rebuilt the correct ABI using something like electron-rebuild. It looks like this problem has been around a while, and even a few hacks came and went.
Here is an example of the issue with sqlite3: https://github.com/ballpit/electron-sqlite3-fork-bug/blob/master/main.js
It looks like node-gyp-build had a similar issue a while back, and they ended up implementing a check for the process.env.ELECTRON_RUN_AS_NODE and returning electron bindings when thats found, and it looks like maybe we need to port that over to node-pre-gyp as well to fix this problem.
It looks like the ABI selection is happening in https://github.com/mapbox/node-pre-gyp/blob/master/lib/util/versioning.js. Any idea where such a check might live in that file?
The text was updated successfully, but these errors were encountered: