Overdue Node-Red upgrade

I am a little bit behind keeping my Node-Red up-to-date. Actually not so much Node-Red, but Node.js. And I cannot updated some of my components, as my Node.js is still v14.
Node-Red: v3.0.2
Node.js: v14.21.0
npm: v6.14.17

I am always very hesitant to update anything. I feel very condifent working in Node-Red, but absolutely not confident at all in Linux. And I have too much stuff in it for Node-Red not to be working for extended period.

I mostly want to updated, because I am a full major version behind UIbuilder which will not run on Node 14 any more. This may explain the issue I am getting (recent topic).
Some of the module upgrade also complain about process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0 and I don't remember why I put it there.

Can you think of any issues I may be facing during the upgrade? Should I upgrade Node separately, or just run the Node-Red bash script with --node20 parameter?

You’ll get less issues if you use --node18 For now at least.

Hi Csongor, UIBUILDER should absolutely run on Node.js v14 as I try to keep it in line with Node-RED who's base is still v14 (it is overdue for an update that changes that).

Please let me know if something error's on v14 as I either need to do a major version update or I need to fix it.

However, you would, as Dave says, be best using v18. As always, take a full backup just in case then upgrade node-red and all nodes and node.js - not forgetting to run npm rebuild after the upgrade.

Of course, I think Dave's script does all that for you if you are able to use it.

I get the below errors when I want to update my 5.1.1 to the current version:

2023-11-30T19:42:10.063Z Install : node-red-contrib-uibuilder 6.7.0

2023-11-30T19:42:10.562Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-uibuilder@6.7.0
2023-11-30T19:42:15.653Z [err] npm 
2023-11-30T19:42:15.653Z [err] ERR! code ENOTSUP
2023-11-30T19:42:15.660Z [err] npm
2023-11-30T19:42:15.661Z [err]  ERR! notsup Unsupported engine for jsdom@22.1.0: wanted: {"node":">=16"} (current: {"node":"14.21.0","npm":"6.14.17"})
2023-11-30T19:42:15.661Z [err] npm ERR! notsup
2023-11-30T19:42:15.661Z [err]  Not compatible with your version of node/npm: jsdom@22.1.0
2023-11-30T19:42:15.661Z [err] npm ERR! notsup
2023-11-30T19:42:15.661Z [err]  Not compatible with your version of node/npm: jsdom@22.1.0
2023-11-30T19:42:15.661Z [err] npm ERR! notsup Required: {"node":">=16"}
2023-11-30T19:42:15.661Z [err] npm ERR! notsup Actual:   {"npm":"6.14.17","node":"14.21.0"}
2023-11-30T19:42:15.666Z [err] 
2023-11-30T19:42:15.666Z [err] npm ERR! A complete log of this run can be found in:
2023-11-30T19:42:15.666Z [err] npm ERR!     /home/nygma/.npm/_logs/2023-11-30T19_42_15_662Z-debug.log
2023-11-30T19:42:15.672Z rc=1

Oh poodles!

Very annoying that npm didn't warn me about the mismatch between uibuilder's engine setting (>=14) and jsdom's (>=16).

I need to downgrade jsdom to v21 and test whether it still works - or I'll need to do a major upgrade version of uibuilder to bring it up to node.js v18 as a minimum. Since node.js v16 is already past end of life and the latest version of jsdom is already pinned to v18.

I really do hope we are going to get Node-RED v4 soon and that it will use node.js v18 as its base. These node.js version issues are starting to bite now.

I can only apologise. jsdom was introduced to support the uib-html hydration node as it gives a DOM to use in node.js.

Hey, no worries at all. I have loads of stuff to be done before Xmas the uibuilder test can be put on a backburner for a bit. Maybe with 4.0 I can upgrade everything in one go.

Well if you've upgraded to node.js v18, you'll be fine anyway.