Update long-term live Node-RED in readiness for testing the new Matter node

Cant upgrade to latest. Even if I wanted to punish myself - Grafana does not seem to want to install now. I've a ton of control stuff running on NR I don;t want to lose...

Sure you can :slight_smile:

Punishment is missing out on the bug fixes and improvements (my opinion of course)

pretty sure Grafana is mostly go based & I am more than certain it runs with (for example) with NodeJS v16 (which is the min requirement node red v3.0.2 - excluding v14 which is EOL) - so that should have no bearing on upgrading nodejs/node-red?

You typically dont lose stuff upgrading node-red. That happens when the sledgehammer comes out "It wouldnt update so I deleted everything" scenarios.

But, we are off-topic (sorry @FezVrasta)

Sounds like it may be time for a parallel instance of Node-RED Pete! :grin:

I'm sure you must have a spare device or 2 left over from other projects. :wink:

armed weith RPI-clone I backed up my install and went for the upgrade - it worked but I have a load of errors showing (hsh connection and eWwLin issues) - next step is to backtrack to see if they were there before. A t one time SQLITE and the serial port almost always caused issues when upgrading but I'm not seeing any of that - however - the upgrade has NOT upgraded nodejs - still at 14.21.3

And that's why you have no errors from the binary packages.

I was actually thinking you might set up a new, blank Node-RED instance on a new device. As you doubtless use MQTT, inter-instance comms is simple enough.

But yes, trying a full upgrade of your live system also works. :grin:

Brand new install is useless to me - I have years of additions and many, many devices attached to my NR installation - and Aledxa and Google and... a very long list... controls large sections of the house.....

I'll back up this new install then try a later node-js and if THAT works I'll retry the matter package... watch this space..

Thinking about it - having upgraded to NR 3 using their script - and it retaining nodjs 14 I've no idea how to upgrade nodejs separately without causing all sorts of issues ...

You learn every day - see this?

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

There are extra parameters you can pass to the script. Add ` –help` to the end of the above command to see them.

No you can't. --help  on the end results in ERROR: UNSUPPORTED FLAG -HELP. I'll report that somewhere relevant.

Moved to new thread to keep the one about the Matter node clear.

Ah, well I never use the script but I know that there are flags for the different versions of node.js

@dceejay - any help you can offer Pete?

This works ok for me
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --help
Perhaps Peter forgot the space before the option, or perhaps only one -
To upgrade to nodejs 18 use --node18

In the instructions there was only a single minus. Anyway I quickly figuerd it out. I have node-red latest running with my original nodejs 14 but ehen I tried the options to use nodejs 18 and update nodes, NR simply won't statt up..

Thank heavens for rpi-clone.

Enough for one night..

Pete

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.19:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
Error loading settings file: /home/pi/.node-red/settings.js
Error: Could not locate the bindings file. Tried:
 → /home/pi/.node-red/node_modules/i2c-bus/build/i2c.node
 → /home/pi/.node-red/node_modules/i2c-bus/build/Debug/i2c.node
 → /home/pi/.node-red/node_modules/i2c-bus/build/Release/i2c.node
 → /home/pi/.node-red/node_modules/i2c-bus/out/Debug/i2c.node
 → /home/pi/.node-red/node_modules/i2c-bus/Debug/i2c.node
 → /home/pi/.node-red/node_modules/i2c-bus/out/Release/i2c.node
 → /home/pi/.node-red/node_modules/i2c-bus/Release/i2c.node
 → /home/pi/.node-red/node_modules/i2c-bus/build/default/i2c.node
 → /home/pi/.node-red/node_modules/i2c-bus/compiled/18.17.1/linux/arm/i2c.node
 → /home/pi/.node-red/node_modules/i2c-bus/addon-build/release/install-root/i2c.node
 → /home/pi/.node-red/node_modules/i2c-bus/addon-build/debug/install-root/i2c.node
 → /home/pi/.node-red/node_modules/i2c-bus/addon-build/default/install-root/i2c.node
 → /home/pi/.node-red/node_modules/i2c-bus/lib/binding/node-v108-linux-arm/i2c.node
    at bindings (/home/pi/.node-red/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/i2c-bus/i2c-bus.js:4:32)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/home/pi/.node-red/settings.js:20:11)
    at Module._compile (node:internal/modules/cjs/loader:1256:14) {
  tries: [
    '/home/pi/.node-red/node_modules/i2c-bus/build/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/build/Debug/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/build/Release/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/out/Debug/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/Debug/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/out/Release/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/Release/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/build/default/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/compiled/18.17.1/linux/arm/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/addon-build/release/install-root/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/addon-build/debug/install-root/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/addon-build/default/install-root/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/lib/binding/node-v108-linux-arm/i2c.node'
  ]
}
nodered.service: Succeeded.

I think it is a problem with the backticks, if you look carefully you will see one of them is not the right character. The source probably has two but they have been joined together in the html. You are right though, that is an error in the docs.

That's odd. I use v18 on both Windows and Linux and have no issues.

Seems that way - but as it's now commented here, people may see this and figure it out. I got the help - installed the new NR 3 and alls well on NodeJS14 - default as that's what I had.. but no joy then updating to nodjs18. I asked the script to update to nodejs18 and to update the nodes... result - NR would not start - next time I'll copy the logs before restoring the backup via rpi-clone.

Do you not have a spare card so you do not need to overwrite the original?

Doesn't matter overwriting. I use RPI-clone (I have macros so 3 commands depending on what I'm doing cloning to sda, sdb (a pair of SSDs permanently attached by USB-C) or the SD... "clone", "cloneb", "clonem" - without the quotes. Takes a few minutes but no interaction. So "clone" does the backup, powerup with SD out and put in SD and type "clonem" (then reboot to SD) restores the original. I always keep 2 backups hence I've not lost my setup in years and always been able to upgrade eventually - but now, this nodejs18 upgrade has me confused - only needed to get that MATTER node running (apparently nodejs16 would do). People are also having trouble with Grafana on new installs - can't risk that going down. Any comments on the nodejs would be helpful.... should I try 16? Do I need the upgrade nodes option?

Hi Pete,
The upgrade script only updates the core of Node-RED - it doesn't upgrade any extra nodes you have installed - like the i2c one mentioned in the error above. You should go into your user directory (.node-red) and run npm rebuild to rebuild any with binary bindings. (You may also want to do an npm outdated to see what else may be old and may need a refresh.)

Thanks Dave - I have 2 of my cats to take to the vets this morning for checkups - will endeavour to do just that later today....so - should I go for the minimum - nodejs16 - or 18 - or in at the deep end - 20?

I thing the upgrade script should have done that, did you mean npm update?