Node Red update failure (to v5.0.0) using script

I was running a version of NR just previous to this v5.0.0 upgrade. I used the following script to update Node Red:

bash <(curl -sL https://github.com/node-red/linux-installers/releases/latest/download/install-update-nodered-deb)

which I got from "Node Red - Getting Started" web page:

Running on Raspberry Pi : Node-RED

The install script tells me I have Node.js v 20.20.2 and NPM v10.8.2 and Node Red 5.0.0. Does the script not also update Node.js?

I've always used this script with no problems however after trying a couple of times I keep getting the following error (NR log) when I restart Node Red:

Starting as a systemd service.
Started nodered.service - Node-RED graphical event wiring tool.
Unsupported version of Node.js: v20.20.2
Node-RED requires Node.js v22.9 or later
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Scheduled restart job, restart counter is at 7.
Stopped nodered.service - Node-RED graphical event wiring tool.
Started nodered.service - Node-RED graphical event wiring tool.
Unsupported version of Node.js: v20.20.2
Node-RED requires Node.js v22.9 or later
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.

Any suggestions how to repair this?
Thanks

So I updated Node.js to v24.17.0 using instructions from this site:

yet NR still would not start.

node -v reports 24.17.0
npm -v reports 11.13.0

I rebooted the system and NR did not automatically start. I used node-red-start and the log reports:

Unsupported version of Node.js: v20.20.2
Node-RED requires Node.js v22.9 or later
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Scheduled restart job, restart counter is at 2.
Stopped nodered.service - Node-RED graphical event wiring tool.
Started nodered.service - Node-RED graphical event wiring tool.
Unsupported version of Node.js: v20.20.2
Node-RED requires Node.js v22.9 or later
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.

Run the script again with --node24 on the end (after a space).

I think they're is a fix in the pipeline to warn you that it needs a later nodejs.

Thank you Colin, that worked perfectly.