Upgrade Node-RED from Node.js 16.20.2 to 18.x or 20.x

Hello,

A quick poll to see whether it would be a problem for you to upgrade Node-RED with Node.js to version 18.x or 20.x
We are on Node.js version 16.20.x, which reached EOL in September 2023

I would have needed at least Node.js 18 for this plugin and for retrieving the Tempo tariffs from a PDF: (Ultimately no longer needed :slight_smile: )

1 Like

Hi @prohand,

I’m bringing this topic up again, because indeed it would be good to update.

The problem is that this update is, in my opinion, a breaking change.

If we force all instances to update Node-RED, it could break installations, right? And that, I think, we really don’t want :grimacing:

Wouldn’t the solution be to add a Node-RED version selector in the interface of this integration?

I hadn’t responded to the survey because I use quite a few flows in Node-RED, but I have no idea at all about the possible impact of the upgrade… The option might be a good idea. Would that allow testing the upgrade and rolling back if we find that our Node-RED flows are broken?

I don’t know Node-RED well enough to answer you. I don’t think so — if you update and it breaks, you’ll have to fix your flows.

In my opinion, Node-RED doesn’t provide a migration assistant for downgrades…

On the Gladys side, for example, we have migrations in place for upgrades, never for downgrades.

To get back to the topic, I’ll try to upgrade Node

3 Likes

[quote=« prohand, post:5, topic:9224 Â»]

1 Like

@prohand Thanks! In any case, I’m not sure a forced update is possible or desirable. I think we’ll need to add a version selector in the integration interface to switch to a newer version.

In the case of Node-RED, the user uses many third-party plugins that aren’t necessarily all compatible with every version, so it’s up to the user to perform the update, I think.

2 Likes

Indeed, the user should be allowed to choose whether to update or not :slight_smile:

Hello,

I’m following up on this topic because I realize I didn’t follow up regarding the update.

I just upgraded my Node-RED to version 4.1.2 (Docker)

I had to update some plugins:

image

I had to restart Node-RED one last time to finish updating the plugins

For now everything seems to be working well.
I’ll keep you posted if I have any problems.

I think the risk of breaking installations is, I believe, limited to the fact that some plugins may no longer be compatible, but we could indeed add a version selector for those who wish to migrate to a newer version.

2 Likes

@prohand thanks for your feedback.

If you had done the update without doing anything, would your flows have continued to run?

Because that’s what’s going to happen if we force an update.

Yes, it would have continued to work, I think, but I’m not 100% sure because I haven’t tested it over several days without updating the plugins.

1 Like

If someone could take this issue and make a PR (and test it, of course), it would help me enormously :folded_hands: