Hi - we are building an Electron/React/Redux application in Windows 7 environment, and it will be deployed to a Windows desktop. However, DevOps pipeline is Linux and we want to use this to build this application. We encountered a few things - like when we took the code developed in Windows and tried building in Linux, it was failing as some of the NPM packages installed were targeting the Windows machine. Question is - is it ok to follow this path - develop in Windows, build in Linux and deploy in Windows? Thanks
It sounds like it should be a valid approach. Are the npm packages that are targeting the windows machine packages that came along when installing electron to the project but are not necessary for the project to function? If they aren’t necessary, you can always add the --prune argument to your electron-packager command call (assuming you’re using electron-packager to build). If you are using a similar module to help you package your application there may be similar arguments to get rid of unnecessary npm packages.
Yes, NPM packages targeting windows machine packages come while installing the electron. Will have to dig deeper to see if they are necessary for project to function. prune is an interesting/helpful argument and will dig deeper into it. Looks like we need wine for Linux to build the electron packages, which is a big library in itself.
Thanks for your inputs.