Upgrade to v4.1.0

Hi,

Upgrade 4.0.9 to 4.1.0 done (npm) and apparently with success.

The log shows - [info] Node.js version: v18.20.8, but i installed a while ago V22 for sake of ZigBee2MQTT.

I am not really familiar with Linux.

Is multiple versions an issue for NR ?

Is it advised to clean/remove older node.js ?

Thanks.

T

You almost certainly have a node.js version manager such as n or nvm installed. This is a pain for most people and even though node.js are trying to push people towards it, it is totally unnecessary in most cases.

The problem being that every time you use one of those tools to change node.js version, any globally installed nodes have to be re-installed. This is also one of several reasons I don’t personally recommend that people do a global install of node-red.

But anyway, you are probably best off removing the version manager from your OS. If that breaks Node-RED, simply re-install it. You will not loose any data/config unless you also delete Node-RED’s userDir (normally ~/.node-red/ for the user id running node-red).

Assuming that you used
npm install --unsafe-perm node-red@latest
or something similar then that would not have changed the version of nodejs.

Running
node -v
and
which node
may throw some light on the subject.

Thanks for reply.

OS upgrades :
sudo apt update
NR : installed cfr instruction on NR site :
sudo npm install -g --unsafe-perm node-red
node.js installed with
npm install -g pnpm
node -v -> v22.9.0, which is a requirement for major upgrade ZigBee2MQTT... which failed so far.
I am in chat-process with AI-platforms for the proper and advised procedure. And again... 3 different approaches. :frowning:

as i installed both with "npm -g", why then is NR reporting "Node.js version: v18.20.8" ?
In the end it's not so important as "I'm completely operational, and all my circuits are functioning perfectly." :slight_smile:

As a newbee in RPI/LINUX... i work now with NR (with context on SSD), AEDES, ESP32, modbus, VPN, MariaDB, UZG-01 (coƶrdinator) and ZigBee2MQTT.
And UI : standard web page and socket.
All the operational was surprisingly "straight forward" to work with... except the confusing multiple wow how to install.

They say we fly to mars ! Hope they do not work with linux. pfffffffffffff

Cheers.

T

As already mentioned, you are likely using a Node Version Manager like n or nvm or fnm. Running the command which node should give us a clue.

The version of Node that node-red runs under depends entirely on what you did in the beginning (i.e. which node manager you installed. Again, running the command which node should give us a clue)

NOTE: The recommended install is to NOT install a node manager especially if you are running as a service and dont really quite understand what that means. Far better sticking with a global install of Node

As it stands, your options are:

  • learn about node version manager you have installed and set it to use Node 22 for the account/userdir that Node-RED runs in
  • remove node manager and rely on globally installed node version

As for installation, if you are using a debian based OS (like Debian, unbuntu, raspian, etc), then the recommended install is via the official installer script.

ok.

which node returns : /home/rpi/.nvm/versions/node/v22.9.0/bin/node

I ā€˜ll stick to official installer script.

I checked Gemini how to remove nvm, and it is … back-up, deactivate, rm directory, shell clean up... will do.

Cheers,

T

1 Like

Hi,

As mentioned i upgraded NR to Version 4.1.

At the bottom there is now an indication of update available : in casu AEDES.

When run i get this :

2025-08-01T06:02:05.876Z Install : node-red-contrib-aedes 0.15.0

2025-08-01T06:02:05.243Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --omit=dev --engine-strict node-red-contrib-aedes@0.15.0
2025-08-01T06:02:12.481Z [err] npm error code EBADENGINE
2025-08-01T06:02:12.481Z [err] npm error engine Unsupported engine
2025-08-01T06:02:12.481Z [err] npm error engine Not compatible with your version of node/npm: node-red-contrib-aedes@0.15.0
2025-08-01T06:02:12.482Z [err] npm error notsup Not compatible with your version of node/npm: node-red-contrib-aedes@0.15.0
2025-08-01T06:02:12.482Z [err] npm error notsup Required: {"node":">=20.0.0"}
2025-08-01T06:02:12.482Z [err] npm error notsup Actual:   {"npm":"10.8.2","node":"v18.20.8"}
2025-08-01T06:02:12.487Z [err] npm error A complete log of this run can be found in: /home/rpi/.npm/_logs/2025-08-01T06_02_05_568Z-debug-0.log
2025-08-01T06:02:12.511Z rc=1

Removing NVM will solve this ?

Cheers,

T

Yes it will

NVM removed.
node.js removed, installed, clean up of cache
exec of advised bash re-install NR
updated pending AEDES
NR stop/start →

Welcome to Node-RED
1 Aug 09:20:17 - [info] Node-RED version: v4.1.01 Aug 09:20:17 - [info] Node.js  version: v20.19.4

looks like all fine.
Thanks for the patience with a 70++ newbee.

2 Likes

Never too old to be a newbee :wink:

Happy to see you got this fixed up.

1 Like

Hope I can still be a Newbee when I’m 70 !

2 Likes

welcome to the club! :grinning_face:

It's a bigger club than you think :blush:

1 Like

FYI : next step was major version 2.5.1 upgrade of Zigbee2MQTT. Previous attempt failed, but now also solved after re-install/clean-up node.js
Z2M config required to adjust setting to AEDES-server, and serial adapter now set to zstack and removed baudrate.
Z2M service required no adjust
Node-Red : node-red-contrib-zigbee2mqtt no issue

"I'm completely operational, and all my circuits are functioning perfectly.", but need to be 70+ to know where this quote comes from.

Hal said : "I am completely operational, and all my circuits are I am completely operational, and all my circuits are functioning perfectly..
functioning perfectly."

Another much bigger pain is when the version of your operating system is too old. Like yesterday when I upgraded a RPi4 and it did not succeed to update node.js to a later version than 18.

The os on that thing is really old, Raspbian Buster. Node 18 is the latest you can install on it. Upgrading the os to a later version is possible but requires a lot of effort, the amount depending on what you have installed on the thing and I have unfortunately a lot, besides being a bit lazy with such stuff. This also means I will sooner or later run into situations where upgrading of some nodes will not work due to their requirements

I’m in the same situation, as I still use a RPi3B+ with Buster. You can install NodeJS version 18, but don’t try 20 or later. Due to the Glibc issue. I can confirm, that NR v4.1.0 runs on a RPi1B+, but with Bookworm.

So I have to update my Pi 3B to a newer version, sooner or later.

Node red 4.x will run on Buster with nodejs 18

Do yourself a favour, install mosquitto. It is, yet another hurdle on the way. However, as an MQTT broker it is an excellent one.

1 Like

In most cases you can ā€œmanuallyā€ upgrade the OS level without issue - it just takes a long time… - you can do a full upgrade to latest patches on the level you are at currently - then manually edit the /etc/apt/sources.list and /etc/apt/sources.list.d/* files to point to the next level up OS - then sudo apt install and full upgrade that… - then repeat until you are on the latest level…

Normally there is also a do-release-upgradecommand installed that will do the same thing for you.

But as I said it can take a while - like 2-3 hours…

Now I feel young at ā€œjustā€ 65! :smiley: