Hello everyone,
I am developping software to help program microcontroller boards and I have integrated Node-RED into my Electron application to retrieve data sent by my boards (https://www.youtube.com/watch?v=n9rFr5-rc1E).
I used the example code (https://nodered.org/docs/user-guide/runtime/embedding ) and it works fine, but I would like the user to be able to launch a popup (node-red launches in the background) and close it (and thus close node-red and the express server). This seems impossible...
If I close Node-RED and try to relaunch it I have this error in console:
(node:12624) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'forEach')
at Object.addModule (F:\Travail\STM\cloud\WP6 Training\Studio4Education\Studio4Education_Electron_src\node_modules@node-red\registry\lib\registry.js:195:27)
at F:\Travail\STM\cloud\WP6 Training\Studio4Education\Studio4Education_Electron_src\node_modules@node-red\registry\lib\loader.js:153:34
(Use electron --trace-warnings ...
to show where the warning was created)
(node:12624) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see Command-line API | Node.js v20.5.0 Documentation). (rejection id: 1)
Thank you very much in advance.