-
Notifications
You must be signed in to change notification settings - Fork 586
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
Prebuilt binaries aren't fetched when packaging an Electron app #3828
Comments
@kraenhansen Unfortunately after going through our whole build process, we are not able to compile the Realm for Linux on our OSX machine. The fix for that is using
but then the Below is the log from our Linux build
|
@bimusiek it looks like we're currently not publishing prebuilds for 32bit Linux. I've asked my team to confirm weather or not we're considering this combination supported or if 32bit Linux is too much history for us to consider. Would it be possible for you to build for 64bit Linux instead? |
@kraenhansen I just validated that only 1.3% of our users download Linux app so we are fine with building only for x64 as I guess most of those 1.3% are on x64 already. We are getting rid of 32bit Linux build then :) |
@bimusiek I'm happy to hear you're considering that a viable option. I'll make sure to keep this updated as we find a more permanent solution to the original issue. |
Thank you. I can confirm that the workaround works perfectly 👍 |
Goals
Using electron-builder to install native dependencies for an Electron app using Realm JS for Windows or Linux on a macOS machine.
Expected Results
I expect Electron Builder to recognise Realm JS as having a native module which needs to be installed using
prebuild-install
.Actual Results
When building for Windows on a macOS machine, end users of the electron app experience the following error:
This is because the realm.node binary shipped with the Windows build is actually the binary for macOS which never got replaced when the app was being packaged.
A temporary fix we needed in Realm Studio was this line:
My investigations this far concludes: Electron Builder (the
electron-builder
package on NPM) looks for (at least) thebinding.gyp
file when determining if a dependency of an electron app has a native module or not. As a consequence Electron builder won't fetch the correct prebuilds when building the app for Windows nor Linux on a macOS machine. Thebinding.gyp
file was removed as we migrated Realm JS tocmake-js
.We could add the empty file to our package, but since that feels a bit like a workaround, I would love to learn of alternative ways to tell electron-builder to consider Realm JS as having native modules which needs to be fetched when packaging up the app.
This could be related to electron/rebuild#268.
Steps to Reproduce
npx electron-builder install-app-deps
)binding.gyp
file to Realm JS (touch node_modules/realm/binding.gyp
)Version of Realm and Tooling
The text was updated successfully, but these errors were encountered: