Thought I'd update - using the official script, and the first thing it does is remove Node-Red - then I get the error as above - so its deleted my Node-Red !!
Schoolboy error not taking a backup before I started....
How can I re-install this ?
Thought I'd update - using the official script, and the first thing it does is remove Node-Red - then I get the error as above - so its deleted my Node-Red !!
Schoolboy error not taking a backup before I started....
How can I re-install this ?
Your flows should still be OK, try running the script again, and if it fails, then please post your log.
It stopped at the same point again, Logs here - once when it bombed out, and then once again, as you advised
Started : Thu 6 Aug 22:55:05 BST 2020
Running for user pi at /home/pi
Found global nodes: :
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered' is not installed, so not removed
The following package was automatically installed and is no longer required:
rpi-eeprom-images
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 82 not upgraded.
Already have nodejs v12.18.2
Now install nodejs
Versions: node:v12.18.2 npm:
Started : Thu 6 Aug 23:07:30 BST 2020
Running for user pi at /home/pi
Found global nodes: :
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered' is not installed, so not removed
The following package was automatically installed and is no longer required:
rpi-eeprom-images
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 82 not upgraded.
Already have nodejs v12.18.2
Now install nodejs
Versions: node:v12.18.2 npm:
Ended up going back into hb-config and reinstalling everything I could find again. NR 1.1.3 is now installed and I've made a mental note to backup before I attempt again.
That official upgrade/update script I used need looking at, and I've no idea what this stable CLI interface problem is that seems to have stopped everything. Doing a search this appears to pop-up every now and then.
What happened after that? There are no significant problems in the log you showed, the unstable interface message is just a warning from apt, nothing to do with node-red.
Did you interrupt the install at that point possibly? If you are running on a pi 3 or below or if you have a slow internet connection it can take a long time to do the install.
Also the script will not have done anything to your .node-red folder so your flows will still be there.
[Edit] Also what has hb-config got to do with node-red? How are you installing by using that?
Ah, you are using the homebridge. Apparently you cannot use the normal script for installing node-red, you must do it the homebridge way. That is a homebridge issue not a node-red one. I don't know whether the node red script could detect hb and indicate it cannot be used.
It could if I had ever heard of homebridge. What is it ? How can it be detected ?
The error on the Terminal when running the NR script was " ✘ Failed to install Node.js - Exit" and it went back to the command prompt
I've done all my updates/upgrades using the script before, and its worked fine everytime - just following the Node-Red instructions.
Homebridge is a red herring, the hb-config is just their convenient setup and RPI configuration tool. It also allows you to install NR (and other tools), which is how it got installed in the first place, but since initial install I've just followed the official instructions.
As the software had been deleted by the NR script (flows were fine, phew) I though as a last resort I'd try an initial install again, and it worked fine with all automations running as per usual this morning.
Homebridge is just a bridge to the Apple Homekit framework - so allows any non-homekit devices (like Samsung Smarthings, for example) to be exposed to Homekit - which has a higher WAF in this household....
Ok. If you say it’s a red herring I’ll ignore hb for now. I thought the script checked that npm was available before starting to install ( which was the original error) but will double check.
The response to this issue says you must not use the node red script or it will mess up nodejs. Though the issue is not reporting the same error you are seeing. Error with updating plug-in after installing node-red (preconfigured Rpi HB image) · Issue #2626 · homebridge/homebridge · GitHub
That's mess up nodejs for Homebridge - which isn't the issue as it messed up (deleted) NR.
I've run that script everytime I've updated, and never had a problem yet.
Is homebridge a custom OS (like Hass.io for example) or just something you install on vanilla Raspbian? Sounds strange they say it messes up Node.js as all it does is properly install it using Nodesource package archives...
I'm also a bit surprised NR would get deleted before installation. I'd assume the script just uses npm install
which should upgrade instead if something is already installed. Very odd.
Edit: Or was this a fresh/first install over the package installed by Homebridge? If it was and it had installed NR using APT then I'd think the script might actually uninstall the APT installed version first before reinstalling from NPM(?)
Homebridge can be installed on its own on any OS, or there's an RPI specific image for easy installation, but this is just Raspbian GNU/Linux Buster (10).
So its vanilla and runs on anything with node.js/NPM
Node-Red was installed a few months ago, using the Homebridge (hb-config) script for no other reason than convenience, but it just does an npm install, that's all.
Since the initial install, I've done a number of updates (1.1, 1.1.1, 1.1.2, and now 1.1.3) using the NR recommended script and excepting last night, each one has run fine.
Anyway, got it working in the end but a little wary of running the official script now.....
According to the issue it installs its own version of node.js and says that running the script will mess that up.
The script didn't delete node red, it uninstalls it and will then reinstall it, but it never got that far because it had a problem with nodejs/npm.
Given this thread has long since left any discussion of 1.1.3 specifically, I've moved it to its own topic.
Re-read the issue#2626 - the original person used the NR installer, and this is reiterated further down with the comment "The node-red installer you ran installs its own version of Node.js which has caused this issue."
The issue #2626 is with Homebridge and its plugins, not Node-Red.
It may be, and this is getting back to NR, that my issue was caused by NPM being offline - as it sometimes is - and this is also mentioned by others....
Precisely, I am just making the point that Homebridge says not to use the script as it messes up Homebridge, so even if it worked it is probably not a good idea to use it.
OK I was checking that https://www.npmjs.com/package/node-red was online before doing anything... but (as we have found out) the package actually downloads from https://registry.npmjs.org/ so I've updated the script to check that that is available before deleting anything - and if not to bail out.