Node-red editor stuck on launch despite --safe flag

I've been running node-red successfully for years despite not knowing a thing about linux. After updating a palette yesterday (don't remember which one) the editor won't load anymore. It's eternally stuck at "Loading Nodes 43/97", even after restarting the service, rebooting the device, emptying browser cache etc.

I tried using node-red --safe, and it looks good in the command line, but alas, the page still stalls at 43/97. I don't even get anyplace where I could do anything in the UI. I must be doing something wrong on a very basic level. But what? Any ideas?

Edit: when I start it as a service, the log is throwing constant errors regarding a node 2427. It could be unrelated, but maybe that's the culprit somehow. But how can I disable a particular node if the editor doesn't launch? Is there some kind of flag that I could use to disable a particular node or module?

(node:2427) 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 (rejection id: 2)
20 Oct 14:22:58 - [warn] [miio-airpurifier-input:Pollen] Miio Airpurifier Error: Could not connect to device, handshake timeout
(node:2427) UnhandledPromiseRejectionWarning: Error: Could not connect to device, handshake timeout
    at Timeout._onTimeout (/home/pi/.node-red/node_modules/miio/lib/network.js:427:17)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)

What device are you running it on?
How much free memory does it have?
How much free storage?

It's running on a Raspi 3B, RAM is 1 GB, I think, and the SD-card is 8 GB. But it seems there is plenty of storage and RAM available. Do you think this could be of any connection with the issue I'm experiencing?

What versions of node-red & nodejs are you running?

What browser are you using?

Are there any errors in the browser console (F12)

For the editor to hang at 'loading nodes', there is an error of some sort in a node. This isn't about the running flows - so the --safe option won't have any effect.

I think you're going to have to try to remember what node you updated yesterday as that will be the prime suspect.

I'm using node-red v1.1.3 and node.js v12.22.7

Behaviour is the same on any browser, and the errors in the console (Chrome) are what you would expect if the systems stops replying:


Thanks for the heads-up regarding the effect of the --safe option! If I did remember the updated modules (I think it was the google docs one), what would be my next step? How would I go about deactivating individual modules?

You can do a cd $HOME/.node-red and then npm remove node-red-contribute-???? which should remove that node.

If you can’t remember the node, do a cd $HOME/.node-red/node_modules Then a ls -al and look at all the node-red-contrib modules and their dates.

But remember to go back to the .node-red Folder before removing the node.

[note: edited to remove sudo from npm command]

Thanks! That did it. Easier than I thought. Also kudos to @Steve-Mcl , because the errors in the browser console pointed me toward the malfunctioning module.

Generally it is best not to use sudo for locally installed nodes. Only use sudo if you are using -g. Using sudo may mess up file permissions in your home folder.

Arugh I’m out for the morning and couldn’t remember. I originally didn’t have the sudo and then went and changed it. Sigh…. Thanks @Colin for pointing that out

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.