-
Is this a feature relevant to companion itself, and not a module?
Is there an existing issue for this?
Describe the featureI am in the process of creating an application that is closely modeled after the layout of the companion app (electron launcher that spawns a NodeJS process). I initially borrowed a lot of the bundling node executable logic from this application. Then I found out it is possible to spawn the child process using the node runtime that is being included with the electron launcher. I did a very brief test removing the node "bundling" portion of the package.mjs script and altering the launcher main.js and everything appeared to run as expected. I can think of some immediate concerns that might arise by simply using the node runtime provided by electron but was curious if this has been explored before. UsecasesNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We used to just use electron and fork off it when needed, but that meant that we were always lagging behind on electron version as updating electron would risk breaking things especially when they changed major nodejs version. We have had problems in the past when updating the nodejs version, because it would break some of the community written modules. This separate nodejs binary is largey preparation so that we can bundle multiple versions, and use different ones for different modules. Then theres that time that:
Long term, I want to look at replacing electron, as it is a rather heavy solution for the 'tiny' launcher that we have, but that wasnt a motivation here. A nice bonus for us, is that it is very easy to use the same builds on a headless linux server. You simply ignore the electron binary, and launch the nodejs inner directly https://github.com/bitfocus/companion-pi/blob/main/launch.sh#L15 But for your project, using a separate nodejs is most likely unnecessary. The benefit for us is mostly due to the hundreds of community maintained modules and their potentially limited nodejs version support. |
Beta Was this translation helpful? Give feedback.
We used to just use electron and fork off it when needed, but that meant that we were always lagging behind on electron version as updating electron would risk breaking things especially when they changed major nodejs version.
We have had problems in the past when updating the nodejs version, because it would break some of the community written modules. This separate nodejs binary is largey preparation so that we can bundle multiple versions, and use different ones for different modules.
Then theres that time that: