Updating NodeRed on pi Zero 2W

Can anyone advise me whether I can do a full update to the latest versions of NodeJS and NodeRed on a Raspberry Pi Zero 2W (arm7 quad core). I've read that current versions might not run on the zero but I suspect that this does not apply to the 2W. Your advice appreciated.

My current relevant versions are as follows:

28 Nov 09:47:58 - [info]
Welcome to Node-RED

28 Nov 09:47:58 - [info] Node-RED version: v3.0.2
28 Nov 09:47:58 - [info] Node.js version: v14.21.3
28 Nov 09:47:58 - [info] Linux 5.15.84-v7+ arm LE
28 Nov 09:48:00 - [info] Loading palette nodes
28 Nov 09:48:07 - [info] Dashboard version 3.6.5 started at /ui
28 Nov 09:48:09 - [info] Settings file : /home/pi/.node-red/settings.js
28 Nov 09:48:09 - [info] Context store : 'default' [module=memory]
28 Nov 09:48:09 - [info] User directory : /home/pi/.node-red
28 Nov 09:48:09 - [warn] Projects disabled : editorTheme.projects.enabled=false
28 Nov 09:48:09 - [info] Flows file : /home/pi/.node-red/flows.json
28 Nov 09:48:09 - [info] Server now running at http://127.0.0.1:1880/

cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

I have no problem with running the official Node-red install script to update Node-red on my Pi Zero 2s.

Currently node-red --version outputs

Node-RED v4.0.5
Node.js v20.16.0
Linux 6.6.31+rpt-rpi-v8 arm64 LE

Note that this is the 64 bit not 32 bit OS, but I am fairly sure you can use the script to update on the 32 bit OS too.

I think you will find that running the script updates you to Node.js v18, or you can append --node20 to the command to force it to v20.

It's probably a good idea to run sudo apt update && sudo apt -y full-upgrade first of all to ensure the OS is up to date.

You should be ok provided that you are not using an ancient version of Pi OS. It works ok with Buster and later.

Thanks Colin & JBudd for your prompt responses.
I'm running "Raspbian GNU/Linux 11 (bullseye)" on my pi zero 2W.

Could you advise if there's a script to automatically execute the update process? I presume that I should do a Linux OS update first before executing any auto update of NodeJS and NodeRed.

Thanks again for your input.

How did you install node red initially? The recommended install/update script is at Running on Raspberry Pi : Node-RED.

As @jbudd suggested, you should update the os packages first, using sudo apt update && sudo apt full-upgrade

[Edit] Obviously make sure you have everything backed up before you start.

Hi Colin,

Yes, I used the link that @budd posted initially. What I was mainly concerned about were the rumours that I read about being careful to do a full NR update on the pi zero, but as I said I think that this may have related to the zero-w and not the zero-2W, which is a quad core. Now @judd
says that he has no problem on his sic Zero 2s (which I assume is 2W) , which gives me the confidence to proceed.
Thank you both for the input.

Also make sure in node-red that all nodes are on the latest versions. Use Manage Palette for that. Otherwise you may end up with old versions of nodes that are not compatible with the latest node-red or nodejs.

Sure thanks. A related question; will I have to update the configuration data in my Telegram node after I coomplete the NodeRed/NodeJS update followed by the node update or are all settings preserved?

It should just keep going. I have very rarely had any such problems upgrading.