Node-red update from 1.35 to 3.x

How to properly upgrade node-red on beaglebone blue that uses debian 10 ?

Using the normal installation script should work, unless you have anything weird about your system (installed as root, non-standard installation directory etc)
You might need to force it to update node.js to v18 too.

bash <(curl -sL --node18

Obviously take a backup of anything important first.

Is that right for Beaglebone? This doesn't mention using the script Running on BeagleBone Boards : Node-RED

Node-red flow is in /var/lib/node-red/.node-red/
Owner of a folder is node-red

Did a node.js and npm update
nvm install 18.17.1
nvm alias default 18.17.1
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local

To be honest I'm not sure. Your link, which I've never previously seen, begins

If you want the latest Node-RED 1.x

So it is clearly very out of date.

It does state

Note: Do NOT use the Raspberry Pi / Debian upgrade script

while the page for the Raspberry Pi script says

This script will work on any Debian-based operating system, including Ubuntu and Diet-Pi. You may need to run sudo apt install build-essential git curl first to ensure npm is able to fetch and build any binary modules it needs to install.

I do not have a beaglebone to test and in the absense of clearer documentation I suggest @Aivaras1 is probably right to ignore my suggestion about the script (but not about the backup :grin: )

After you update nodejs you must go into your .node-red folder and run
npm install
to make sure that any nodes that need compiling are built against the current nodejs version.

The Beaglebone boards have their own set of packages... Unfortunately the bb-node-red-installer they have that is still included on their latest bullseye image still relies on the debian nodejs 12 package so Node-RED is somewhat stuck.

You should be able to move to the install script... BUT - a) backup first... :-)... b) you will need to fully remove the bb-node-red-installer package and any existing traces of nodejs and Node-RED - and then run the install script...

You will lose access to GPIO pins and such like as the BB install had nodes that were specific to them. I can't recall if they are generally available via the flows site to be pulled in or not. IE - If you need GPIO then you are likely better off not upgrading - or doing lots of homework first.

Okay. It's possible to update node-red while it's running on device. Like, update packages and do a restart ?

In theory yes, and with normal simple upgrade on a Pi for example that is no problem. With such a massive change as Dave has suggested the chances of you getting it exactly right first time is low I think. There is bound to be a good chance it will be non-functional for a time.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.