Is there a problem with the update script?

I tried the regular script on one installation that has 1.1.3 and one that has 1.3.2, and both exited without any errors. The script:

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

The output:

Running Node-RED install for user pi at /home/pi on raspbian
You can force an install of node 12 or 14 by using the --node12 or --node14 parameter
However doing so may break some nodes that may need re-installing manually.
Generally it is recommended to upgrade all nodes to their latest versions before upgrading.
Please backup your installation and flows before upgrading.
Exiting now.

Is that a problem centrally, or can it be that I have nodes that prevents the upgrade? The oldest node I have is Tellstick Duo, which is not updated anymore.

which version of node.js do you currently have installed ?

10.24.0 on both the oldest and the newest, for some reason.

You can use the Manage Palette option in the menu to check for any nodes that can be updated.

@Colin I am aware of that. But that doesn't let me update the actual program or node.js, which is what I'm trying to do. I just now tried to upgrade the nodes that were upgradeable (as I said the Tellstick node hasn't been updatet for years), but that didn't let me upgrade the core files, the script still has the same answer. And I have upgraded Pi's before that have the Tellstick node running without any issue.

so yeah - the latest script doesn't force update nodejs to the supported version 12 and 14 - you need to update to node 12 or 14 - but we aren't going to force that in case you have something you rely on.

Ah, you posted while I was writing that I had to use the force --node12 to get it to run. I'll just have to see if it breaks something. As you say, this is something new, I have done this not so long ago on one of the same Pi's, and it didn't give me this. I didn't dare to do any force stuff befor I knew that it wasn't some kind of a bug. Thanks!

I think the wording in the script could be improved, I don't think it is clear that the reason it is exiting is that nodejs needs to be updated.

Yes. Not ideal I know. But there are a lot of devices out here including embedded type ones that are still running node 8 and 10. any that have binary code (probably like Tellstick) need recompiling and the potential for breaking them is too great for me to risk just trying to force them without the user actually being involved.

It only said that I could force it to do 12 or 14, and not that this choice was necessary to move on with the upgrade, so I agree that it could have told me that, and "it's your own fault if you break something and don't have a backup" (which I of course have - I do an image backup on every major change.

Edit: Oh, and the Tellstick node did break on the upgrade, so I guess I'll have to go back to that image backup. It's not possible to upgrade Node-RED without the node? As I said I have one running 1.3.2 and one running 1.1.3, and I guess that should mean that it's at least possible to upgrade Node-RED to 1.3.2 on Node.js 10, right?

Perhaps it could say:
Node red now requires node version 12 or above, you can force an install of ...

Btw I was able to downgrade node.js with these comands:

sudo npm install -g n
sudo n 10.24.0

And then I used the downgrade for Node-RED,

sudo npm install -g --unsafe-perm node-red@1.3.2

But that didn't fix my Tellstick, so I'll go back to the previous backup. What was the final version that supported node.js 10?

You can upgrade just node red using
npm install -g --unsafe-perm node-red

Thanks, I'll try that and see if that works with the Tellstick node. Damned annoying that nobody has upgraded that in four years or so. There has been some questions at the Swedish Tellstick board, but nobody has managed to make it work in any other way than I found after trial and error. And that does not work with Node 12.

I think if you specify the node-red version to be 1.3.5 then it will install that and leave the nodejs at 10.
so --nodered-version="1.3.5" should work - as version 1 still supports node 10.

I used Colin's syntax, and that worked. I now have 1.3.5 and Tellstick working, thanks! :grinning:

Does the script now install version 2 by default? I thought that wasn't released yet.

no - it installs latest by default - so currently 1.3.5. (though again you can specify --nodered-version="next" for 2.0-beta)
And the logic is there in anticipation of 2.0 which is why it wants node12 or 14... but using the --nodered-version="1.3.5" skips that test.

OK, understood.

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