How can I compile an electron app on a Windows environment to run on Raspberry PI?

Viewed 673

I've created an electron app on my Windows 10 computer. I've used electron-packager to package the app for linux using the armv7l architecture (Raspberry Pi 4). However, when I run it on the PI, it outputs an "invalid ELF header" error.

I understand that this is due to the node_modules having been built for windows. Is there any way that I can compile the app on Windows, but tell the compiler (electron-packager) to rebuild the node_modules for the target platform? I don't want to have to install anything on the PI prior to my application as the app needs to be a standalone executable. My main dependencies are serialport and tableify, other than electron itself.

Any help will be appreciated. Thank you.

0 Answers
Related