Skip to content
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

node-gyp not rebuilding correctly #404

Closed
adelphes opened this issue Sep 8, 2020 · 11 comments · Fixed by #409
Closed

node-gyp not rebuilding correctly #404

adelphes opened this issue Sep 8, 2020 · 11 comments · Fixed by #409
Assignees
Labels

Comments

@adelphes
Copy link

adelphes commented Sep 8, 2020

Native dependency detection appears to be breaking in v2.0.2.

electron-rebuild no longer correctly identifies all the native dependencies needed to be rebuilt.
Reverting back to v2.0.1 fixes the issue.

I will do some more digging into the problem, but the issue is probably related to the changes in 9d166a8

@malept
Copy link
Member

malept commented Sep 8, 2020

It would be great if you could provide a minimal testcase for this that we could add to the testsuite, to avoid any regressions in the future.

@expressw
Copy link

expressw commented Sep 9, 2020

I have the same issue when rebuilding native module 'serialport'.
Look at this:
https://stackoverflow.com/questions/63794519/serialport-for-electron-node-module-version-error-and-rebuild-does-not-fix#

@MarshallOfSound
Copy link
Member

Can confirm @malept 2.0.2 is not working correctly. Had to downgrade to 2.0.1

@malept malept self-assigned this Sep 9, 2020
@malept malept changed the title Native dependencies are missed node-gyp not rebuilding correctly Sep 9, 2020
@malept
Copy link
Member

malept commented Sep 9, 2020

Proposed fix in #409, please test.

For those using yarn, use dependency resolutions to point to the branch name.

@todbot
Copy link

todbot commented Sep 9, 2020

As a small datapoint, PR #409 works for node-hid and Electron v10.1.1 https://github.com/todbot/electron-hid-test/blob/master/package.json

@adelphes
Copy link
Author

I can confirm that #409 fixes our build. 🎉

@electron-bot
Copy link

🎉 This issue has been resolved in version 2.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@MMcKester
Copy link

MMcKester commented Nov 13, 2020

For some reason I can't confirm the fix. Here is a reproducible build with the latest version to compile nodegit:

https://github.com/Githubber2021/node_module_version-issue

git clone https://github.com/Githubber2021/node_module_version-issue
cd node_module_version-issue
npm i
npm run rebuild
npm run ava
...Error

@malept
Copy link
Member

malept commented Nov 13, 2020

Not sure what you're trying to show in your repro instructions, that makes sense since you're trying to use a native module compiled for Electron 10 with AVA running with whatever Node.js version, which will never have the same ABI version number.

@MMcKester
Copy link

MMcKester commented Nov 13, 2020

Thanks! Just a few minutes ago I noticed that Electron has a different ABI version than node.js and I don't understand why.

For instance node version 14.15.0 has a specific ABI version.
If I download the latest Electron version which according to the release notes uses also node 14.15.0 it has a different ABI version. Why is that? I am very sorry if this doesn't fit here, but I have to give it a shot since it's really difficult to grasp without the historic insights https://stackoverflow.com/questions/64815484/why-is-there-a-mismatch-of-module-versions-between-electron-and-node-js

I can delete my posts here on request since its very off-topic. Sorry for the noise

@malept
Copy link
Member

malept commented Nov 13, 2020

My understanding is that Electron uses BoringSSL instead of OpenSSL, which changes the ABI surface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants