I am currently using Node.js ver 18.20.8 and node-red ver 4.1.8 , when I run the update script it exits and tells me that node-red no longer support node.js 18.xx , it then tells me that I can force the installation of Node.js 22.xx by adding --node22 to the end of the update script, I have tried this and it returns No such file or directory, am I doing this right ?
Did you add a space before --node22? If you did then where do you see the error message? If it is right after starting the command then copy/paste the text you see, including the command you entered. Copy/paste text please, not screenshot.
If the error is after the command has started then copy/paste the install log please. /var/log/nodered-install.log
What type of pi is it and what OS version are you running. cat /etc/os-release will tell you that.