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?
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.
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.