Upgrade to NR 5.0? Requirements not enforced by installation script?

So upgrading to 5.0... (from 4.1.4 if memory serves)...

The recommended Node.js version for Node-RED 5.0 is Node.js 24. [1, 2]

While the project recommends Node.js 24, here are the detailed system requirements to keep in mind:
Node.js Compatibility

  • Recommended: Node.js 24 (LTS). This is the version that the official Node-RED Docker images are built upon.
  • Absolute Minimum: Node.js 22.9.0. Node-RED 5.0 will actively refuse to start on any older versions. [1, 2, 3]

However... when I ran the install/upgrade script...

Running Node-RED install for user nodered at /home/nodered on debian
This can take 20-30 minutes on the slower Pi versions - please wait.
Stop Node-RED :check_mark:
Remove old version of Node-RED :check_mark:
Node option not specified : --node20, --node22 or --node24
Leave existing Node.js : v20.20.1 Npm 10.8.2
Clean npm cache -
Install Node-RED core
Move global nodes to local
Npm rebuild existing nodes
Install extra Pi nodes
Add shortcut commands
Update systemd script
Any errors will be logged to /var/log/nodered-install.log

Clearly the install/upgrade script does or did not enforce --node22, what is the deal?

Of course this results...

$ sudo node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.7:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as root systemd service.
Started nodered.service - Node-RED graphical event wiring tool.
nodered.service: Referenced but unset environment variable evaluates to an empty string: NODE_RED_OPTIONS
Unsupported version of Node.js: v20.20.1
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'.

Of course also... I could use --node22 but that is not the default? For 5.0 Upgrade?

Please be explicit as to exactly which script you ran, there is a new one and also include the exact command line you ran so we can see the options.

Given the script output you have posted still lists --node20 and that is not included in the latest version of the install script we need to confirm which of the 2 scripts you are running? I suspect you ended up running the update-nodejs-nodered not the install-undate-nodered

And as always contribution to update the install scripts are always welcome

I see the website has been updated to point to the new one. I had expected the old script to have been updated to the new one, which would be less confusing I think.

I notice that the description on the website of what the script does has not been updated. I would submit a PR but I am not certain exactly what it does under all circumstances.

Since I pulled the what I believed was the official install/update script... I had to run said script explicitly with --node22 as documented to address the issue.

The only script I ran was... Or so I believe given it will update in place... Google A.I. return this script, and it looked correct as memory served, and the script name made sense, so ran it...

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

Once without --node22, then once with --node22 since the expected forced update of at least node.js to version 22.x was not implicitly done.

I pulled out my old notes, the last time I did an explicit update to 4.1.4 (I believe) some time ago...
$ bash <(curl -sL https://github.com/node-red/linux-installers/releases/latest/download/update-nodejs-and-nodered-deb)

Google A.I. seems to consistently return this...
$ bash <(curl -sL https://github.com/node-red/linux-installers/releases/latest/download/install-update-nodered-deb)

Given the name of the script one would think 'install-update-nodered' would always do just that... install or update automatically.

Maybe a version number in the script name or something in the script output as to the script version would be a good idea? No? As to which script was run?