Updated node.js is not recognised by Node-RED - Now Broken Node-RED

I have updated node to the LTS v20.16.0 but Node-RED (version v3.1.1) is still seeing Node.js v16.19.1 (I have done npm rebuild in both the Node-RED user directory and the installation directory.)

I have run the install script (Running on Raspberry Pi : Node-RED) and this all looked like it ran OK, but now Node-RED will not start (and it's still referencing node.js v16:

Node-RED[28375]: Node-RED requires Node.js v18 or later
systemd[1]: nrd.service: Main process exited, code=exited, status=1/FAILURE

I'm stuck! What should I do next?

It looks like you have another version installed. Have you previously used one of the node version managers such as nvm? If so, get rid of it.

It wasn't nvm (which I haven't ever installed AFAIK), but the Node upgrade instructions I had followed had put a version in /usr/local. I removed that and ran the install script again, but with --node20 appended and it all worked. Thank you.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.