I had a problem with Node-RED to crash immediately on startup. The root cause was my error in a function node code (probably causing memory overflow), which was executed immediately after Node-RED startup. I could not interact with GUI, as the crash did happen immediately after flows did start.
To fix this, I did temporarily disable the flow containing the function by editing flows.json file.
Example from the beginning of the flows.json before the edit:
[{"id":"437ad66a.07ea21","type":"tab","label":"My flow","disabled":false,"info":""}
Disabled followed by false means that the flow is enabled.
Example of the edited flows.json, to disable the flow:
[{"id":"437ad66a.07ea21","type":"tab","label":"My flow","disabled":enabled,"info":""}
After switching disabled to enabled like above, I re-started the Node-RED, and was able to access the GUI and fix the code on my function node. After that I re-enabled the flow in the UI.