So , was developing a "compiler" for a fleet of node-red devices, but got in a problem.
Whenever i install all of the dependencies from a list, and then restart node-red it hangs on :
Jan 18 18:59:55 G100-sn775 Node-RED: 18 Jan 18:59:55 - [info] Server now running at http://127.0.0.1:1880/
Jan 18 18:59:55 G100-sn775 Node-RED: 18 Jan 18:59:55 - [info] Starting flows
WebUI is not loading and stopping it (either with node-red-stop or systemctl) takes ~3-4 minutes.
node-red --safe does bring up the WebUI, and after deployment everything work as expected.
was thinking that it was dependency related (.node-red/package.json)
but its actually flow related, and that flow haves several functions that use mqtt, modbus-tcp , modbus-serial.
Any ideas where should i start debugging, or what 'automatic' solution i can incorporate ,maybe declaring them in settings.js instead of the function ?
So, me and my team developed a flow compiler, we have a config file which we specify, and a flows library in a repository, and based on the config file we craft/compile in to .node-red/flows.json (managing flows and node id , implementing node configs, managing credentials...)
So sorry if you misunderstood me i have ~25 function nodes using external modules and i think that is what is causing the issue of not starting the flow. But have no idea how to debug it.
I had the same issue a while back.. and got it sorted as below
You have to identify the function or flow causing the "stopping/hanging" of startup.
Start in SAFE mode (as you did)
Disable latest flows , and keep the ones active you know are working properly
Restart in normal mode
repeat 1-3 until you have identified which flow is creating the issue
Enable the flow which is causing the issue
Disable the latest functions or nodes which you suspspect causing the issue
Restart in normal mode .. if system fails to start ..tham start in SAFE mode and disable further functios
repeat the process until you identified the funcion/node responsible for "Stopping/hanging" the start process
There are several reasons a function/node is not starting up properly during a fresh-start in comparision to a full-deploy afte a Safe-Mode start.
For me it helped to put a delay in front of the function/node when starting up (this will ensure all system resources are up and running)
As soon you have identified the function/node causing the issue you need to investigate specifically in regards to the function/node and may need to reach out to the function/node developer or here in the forum again.
I know this will not help you directly, but hopefully you can noarrow down the issue
Started redesigning the flow that was crashing. And will try to not start functions on start of the flows, which i think are causing all of these non sense, plus i need to add further functionalities to the flows, and starting from scratch makes the most sense.