I'm creating an app using electron
and nodejs
, when I try to build it with electron-builder
using following command:
electron-builder --mac --linux --win --x64
it builds native modules only for my current os. Is there a way to build native modules for all operating systems?
you can't. https://www.electron.build/multi-platform-build
If your app has native dependency,
it can be compiled only on the target platform unless prebuild is not used.
prebuild is a solution, but most node modules don't provide prebuilt binaries.
macOS Code Signing works only on macOS. Cannot be fixed.