Questions on upgrading to NR5

I am running node v22.22.3 and npm v10.9.8. After I run "sudo npm install -g node-red", my editor still shows I'm running NR v4.1.11 and no errors were reported. Any idea why the upgrade did not work?

It has been a while but I believe I installed it via: sudo apt install npm then bash <(curl -sL https://github.com/node-red/linux-installers/releases/latest/download/update-nodejs-and-nodered-deb)

The service is running with only this message: Jun 09 07:59:05 pi-NodeRed-v4 Node-RED[570]: 9 Jun 07:59:05 - [info] Waiting for missing types to be registered:
Jun 09 07:59:05 pi-NodeRed-v4 Node-RED[570]: 9 Jun 07:59:05 - [info] - speedtest

Can you post the service file here?

Which file is it?

@knolleary ... so I decided to stop the service and run NR manually... when I did, here was the messages shown:

Welcome to Node-RED
===================

9 Jun 08:08:59 - [info] Node-RED version: v4.1.11
9 Jun 08:08:59 - [info] Node.js  version: v22.22.3
9 Jun 08:08:59 - [info] Linux 6.18.33+rpt-rpi-v8 arm64 LE
9 Jun 08:09:00 - [info] Loading palette nodes
9 Jun 08:09:00 - [warn] [@node-red-contrib-themes/theme-collection] Node module cannot be loaded on this version. Requires: >=5.0
9 Jun 08:09:03 - [warn] ------------------------------------------------------
9 Jun 08:09:03 - [warn] [node-red-contrib-speedtest/speedtest] Error: Cannot find module '/home/pi/.node-red/node_modules/lzma-native/binding-v4.0.6-node-v127-linux-arm64/lzma_native.node'
Require stack:
- /home/pi/.node-red/node_modules/lzma-native/index.js
- /home/pi/.node-red/node_modules/decompress-tarxz/index.js
- /home/pi/.node-red/node_modules/speedtest-net/index.js
- /home/pi/.node-red/node_modules/node-red-contrib-speedtest/speedtest.js
- /usr/local/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/local/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/local/lib/node_modules/node-red/lib/red.js
- /usr/local/lib/node_modules/node-red/red.js
9 Jun 08:09:03 - [warn] ------------------------------------------------------
9 Jun 08:09:03 - [info] Settings file  : /home/pi/.node-red/settings.js
9 Jun 08:09:03 - [info] Context store  : 'default' [module=memory]
9 Jun 08:09:03 - [info] User directory : /home/pi/.node-red
9 Jun 08:09:03 - [warn] Projects disabled : editorTheme.projects.enabled=false
9 Jun 08:09:03 - [info] Flows file     : /home/pi/.node-red/flows.json
9 Jun 08:09:03 - [info] Server now running at http://127.0.0.1:1880/
9 Jun 08:09:03 - [warn]

What does this show (note, nodered, not node-red)?
systemctl status nodered
Check that it shows the service running. If it does then you get the contents using
systemctl cat nodered

If you run node-red in a command window what does it show?

Ok... I was able to upgrade to NR v5 using the original bash script. My issue now is I have a node which is not registered and I can't uninstall it

Oh and my dashboard will not display... when I go to http://xxxx:1880/dashboard/, I get "
Cannot GET /dashboard/"

Here is the response to systemctl cat nodred:
`# /usr/lib/systemd/system/nodered.service

systemd service file to start Node-RED

[Unit]
Description=Node-RED graphical event wiring tool
Wants=network.target
Documentation=Redirecting…

[Service]
Type=simple

Run as normal pi user - change to the user name you wish to run Node-RED as

User=pi
Group=pi
WorkingDirectory=/home/pi

Environment="XDG_RUNTIME_DIR=/run/user/%U"
Environment="NODE_OPTIONS=--max_old_space_size=1024"

define an optional environment file in Node-RED's user directory to set custom variables externally

EnvironmentFile=-/home/pi/.node-red/environment

uncomment and edit next line if you need an http proxy

#Environment="HTTP_PROXY=my.httpproxy.server.address"

uncomment the next line for a more verbose log output

#Environment="NODE_RED_OPTIONS=-v"

uncomment next line if you need to wait for time sync before starting

#ExecStartPre=/bin/bash -c '/bin/journalctl -b -u systemd-timesyncd | /bin/grep -q "systemd-timesyncd.* Synchronized to time server"'

ExecStart=/usr/bin/env node-red-pi $NODE_OPTIONS -- $NODE_RED_OPTIONS
#ExecStart=/usr/bin/env node $NODE_OPTIONS red.js -- $NODE_RED_OPTIONS

Use SIGINT to stop

KillSignal=SIGINT

Auto restart on crash

Restart=on-failure
RestartSec=20

Tag things in the log

SyslogIdentifier=Node-RED
#StandardOutput=syslog

[Install]
WantedBy=multi-user.target
`

What do you mean by that?

Check in Configuration Nodes in the dropdown menu for unused config nodes (click unused in top right). Delete any unused ones and deploy. Then try to uninstall it again.

Since you have got the latest version running we don't need the service file.

When I attempt to delete the missing speedtest node via the cli: npm uninstall node-red-contrib-speedtest, it does not show any errors but when I go back into NR console, it still states missing module

What directory are you in when you run that?
Have to restarted Node-RED after running it?

I'm in /home/pi... after restart no change

You need to run it in the Node-RED settings directory: /home/pi/.node-red/

(Once we resolve this, I'll move all of these replies to a separate topic to keep this overall topic focused on the new release)

Ok brain fart on my part... when I run the uninstall in the .node-red directory, it removed it... my apologizes

I use Node Red v4.1 on a rpi 2b and a rpi Zero. If in the future I need to do a fresh install of Node Red because for example the SD card has failed, will the script as provided in the documentation install a compatible version of Node Red and support Node.js suitable for my device?

Currently yes - it will install node v22 and Node-RED v5 (unless you tell it to install 4.x ) . nodev22 is the last version that will support the armv6 processor and that will become end of life April 27 I think.