Just out-of-interest - what version of OS are you running?
I assume you are running on a RPi ?
Older versions like Buster won't work as 32-bit support has been dropped.
You really need to be running Bookworm OS.
It is run as user, but you need sudo to install it globally. Just like installing most other s/w on the pi.
[Edit] but you don't need to use sudo with the bash script as the script adds the sudo for the required commands for you, which is why you have to enter your password when you run the script (assuming that passwords for sudo have not been disabled).
Ignore the npm warning, you can’t use the latest npm with that outdated version of node.js.
I would say that the other issue is a node-red bug because I think v4.* is supposed to be baselined against node.js v18.
But, node.js v18 it’s beyond end of life. If your os supports it, you should upgrade anyway. Certainly, you should not let anything that outdated be exposed to the internet.
It won't take take the 64 bit version. Busteris 32 bit - yes?
Alas it isn't that simpel to just update.
I have 3 * RasPi working.
Another..... (few) not. All on Buster.
This machine is Ubuntu 22.04 and I would have to update ALL of them as the VNC client/thing is not compatible.
So it is something I may (eventually) hve to do. But am not looking forward to and don't have the confidence to start/try it.
As if I start I MUST finish.
v4, I think, needs to depend on an earlier version of npm? No, it has a direct dependency on validate-npm-package-name v7.0.2. That version has this: "node": "^20.17.0 || >=22.9.0" which is at odds with node-red's base node.js version. It needs to use v6.0.2 which is the last version supporting node.js v18: