Using prebuild with electron-builder
I have a question regarding how/if others use this package with electron-builder. I would like to build for windows using wine, which works with native modules like keytar, but not with wrtc. The former gets automatically refetched for the correct architecture when building the electron package with electron-builder.
I wonder if it is because keytar uses prebuild-install, and if others are having the same problem or maybe use their own solution?
Not sure if that helps you, but this package here is using node-pre-gyp (atm still) to download prebuilt binaries. That is a tool that will fetch the prebuilt for the target platform/arch that it seems to detect.
If there is something wrong with that in combo with Electron (not sure how and why, because it should use the same binary as barebone NodeJS does), I would ask with the node-pre-gyp project ... ;)
I checked and it does look like node-pre-gyp is run during installation, but specifically for my architecture, I guess an additional problem might be that I'm using yarn which doesn't seem to support rebuild for a different platform. Thank you so much for pointing me in the right direction!
I am running into a similar issue, here is what I can gather is happening:
When using electron builder to build Linux on Linux, everything works fine. When using electron builder to build Windows on Linux, the build completes successfully but with the incorrect binary, it still has the Linux bin.
I believe this happens because of how the download script decides when it should download prebuilt BINs.
To overcome this, set the ENV SKIP_DOWNLOAD to true and it should work correctly.