Trying to install using the script (here) onto a brand new Raspberry Pi Zero running Trixie (nothing else installed yet), but apparently installing Node.js the problem.
Fixed by installing npm (sudo apt install npm), but is this something new with Trixie? I installed the "lite" OS version (sans desktop), so perhaps that version does not include npm.
@grant1 what do these commands show (just the first few lines of each, if they show loads of entries) apt policy nodejs
also apt policy npm
and which nodejs which npm
Somehow it has installed the default repo version of nodejs which doesn't include npm (as you found) rather than the Nodesource version - our script should remove/replace it if you specify --node20 (or --node22) - but I haven't checked out Trixie yet - will do so tomorrow.
OK - just tried a clean install of Trixie minimal on a PiZeroW - and just ran the install script - all OK... so yes for some reason you had pre-installed nodejs and it didn't handle it well... I have also now tried to re-create that situation by apt installing nodejs and can confirm re-running the script with --node22 also cleans it up OK.
Thank you for the testing. I have another Pi Zero that I to set up soon with Trixie minimal then Node-RED, and will report back on what happens (hopefully nothing as you found).