Raspbian install script vs. "add software" for node-red?

The recent thread about installation problems on a Pi3 has motivated me be ask about this.

I recently setup a PiZero-W using the full gui image. I find it easier to set things up initially with the gui and a KVM, and afterwards turn off auto login and use ssh & node-red. Sometimes ssh -X is convenient and I've never had much luck getting it to work starting with a minimal install.

I added node-red with the "add-software" gui menu selection and got v18.7 and all has worked fine after doing sudo apt-get install npm (needed to get manage pallet to work). This is a simple box to display some MQTT states with LED indicators. I don't really see me ever updating it as its already hit the "if it ain't broke, don't fix it" benchmark for its task.

So my question, is the "add software" off on a tangent doing some Raspbian thing that will not be "correct" after a few node-red increments, or have they finally figured out that linking the "official" node-red install script would be better for all concerned?

That has got you the version from the Raspbian repository. If that does what you want then so be it. It will never be right up to date though, and may well stay stuck at that version. Eventually you will find you need something it doesn't support and then you will be best to use the update script, particularly if you frequent the forum and keep hearing about all the new stuff coming along. In fact personally I would just start off with the script. I have never known it fail to work a fresh installation, the only time I have had problems was when I had messed with system before running the script and then I had to mess about to get the script to run through.
If you want to try then make an image backup of your card (a good idea occasionally anyway, they do get corrupted occasionally by unexpected power failure for example) and run the script. If you get in a mess you can always restore from the image.

Weeeeeellllll - it's a long story... but to keep it short...

Either way will do... but you can't mix them.

We are endeavouring to keep the apt-get installed version up to date (though we haven't pushed out 0.19.x yet as we want to fix the usual wrinkles first.) If you don't mind being slightly behind the curve then that may be OK. However Debian is notoriously slow at updating core packages (like nodejs) - and indeed npm seems to be "stuck" - so the Pi folk have bumped up to node 8 to help us out. This should be fine until we get to node 10 etc when we go round the loop again. The update-nodejs-and-nodered script that the apt-get installs is a minimal one that just uses apt to update the core package.

Our recommended way is to use the bash script from our docs page that does a much more comprehensive update and moves this to use the nodejs supported version of node 8 which then included npm etc and it also moves some of the built in nodes to a place where they can then be upgraded via the menu and some other tidying up. To do all this it does run as root - which of course is a risk and so the official raspi distro won't allow it (quite rightly). When it runs it also removes the "old" apt-get version and replaces the update script with itself so from then on updates should be done that way instead of using apt.

Up to you which path you take. In general our script will be slightly be slightly ahead of the Pi version - and may also have a few more features, but as long as you apt-get update now and again you should be fine with the apt version, especially if you just want to leave it running.

Thanks for the clarification.

I've moved to using the script for my systems that are still being developed and modified and the repo version for the one and done systems (usually PiZero-W based). Current version is unimportant to me until I find a node I want/need to use that requires it.

Manage pallet has been a very good thing and the main reason I ran the upgrade script on the active development machines. But the upgrade wasn't smooth as it broke a contrib node I depended on that was broken by the nodejs version update. The contrib node author got it straightened out quite quickly for which I am indebted. But for a while I was running nodejs 4.x on one machine and 8.x on all the others, but everything still played together correctly via MQTT.

But eventually all these systems will hit a point where its "all pain and no gain" with updates once they are "correct and complete" and just doing their thing 24/7. For example the "inner core" of my system that handles all the wired sensors and is the MQTT broker to tie it all together, is running Jessie on a Beaglebone and I have no plans to change anything as it does everything required with no foreseeable need to add stuff to it.

I do keep SD card clones for all the running systems, and I have needed them, SD cards seem to me to be the IOT "weak link".

When it runs it also removes the "old" apt-get version and replaces the update script with itself so from then on updates should be done that way instead of using apt.

This I was not aware of and I find it a bit confusing. After I've run the web-page script, how do I update again afterwards?

just run it again is the easiest way... :slight_smile:
All the update-nodejs-and-nodered script does is pull the latest and run it...