Updating outdated components

I just read the thread [MQTT Nodes stopped working] and used 'npm outdated' to see what is out of date on my system.
Seems quite a lot.
Question is, how do I update these and do I need to?
I cannot remember how I installed them in the first place on my Pi3b so any help how to, if I need to please.


To begin with, you can use the same script you used to install Node-RED originally upgrade to the latest Node-RED - https://nodered.org/docs/getting-started/raspberrypi#installing-and-upgrading-node-red

Once you've updated Node-RED to the latest (1.2.6), you can them upgrade the nodes.

You can do that by either opening the Palette Manager in the editor and clicking the 'upgrade' button against each one, or you npm install <name of module> in ~/.node-red for each of the nodes you want to update.

Excellent, thanks.
I'll give it a go

After using the script, also do a npm outdated -g in case you have any globally installed modules that also need updating.

And maybe do a sudo apt update && sudo apt upgrade as well if you haven't. In fact, generally I find it best to do that first.

It is generally best to do these things regularly. Both Linux and the node.js/Node-RED environments are quite fast-moving.

Ok, updated the nodes and just finished updateing Node Red. Seems like I am now on 1.2.6
Next I will go through your instruction Julian.
Regarding the Pi, I regularly do the update/upgrades, so that is ok (I hope).

1 Like

Ok, so an npm outdated with and without the -g option shows:

If you are running pretty much any npm command without the -g then you should do it from within your .node-red folder (or wherever your node-red app resides). Otherwise it is meaningless. The reason is that when run local (ie not global) it looks at nodes installed from the current folder.