Smart Nora 1.0.3 installation problem

Hello All,

Recently I installed successfully the node-red-contrib-smartnora node, version 1.0.2 on both a TrueNAS jail and on a Raspberry Pi 1B.

Yesterday evening I updated successfully some nodes through the "Palette". After a reboot it turned out that some flows had stopped, due to missing nodes. It appears that all Smart Nora nodes had disappeared from the library of nodes and from that flow.

At the same time Smart Nora has been upgraded to version 1.0.3.
So I tried to upgrade to version 1.0.3., through the "Palette". That failed. So tried it again from the command line and that failed as well.
So TrueNas jail will not be upgraded, until this issue is known and solved.

As you can see in the picture above there is a "Warning" indicating "Could not resolve dependency: etc " That is one thing that worries me, however it is only a warning.
It ends with a complete error, complaining about a directory that is not empty.

Hardware : Raspberry Pi 1B (armv6);
Software: Rasberry Pi OS (Buster) with all updates installed.

Is there anyone, who can shine a light on this.

Regards

I have been able to track down these errors to two of node-red-contrib-smartnora node dependencies.

node-red-contrib-smartnora node has 5 dependencies and I decided to try to install these dependencies, before I would eventually install the node-red-contrib-smartnora node.

@andrei-tatar/nora-firebase-common, cbor and node-fetch installed without any error.

As soon as I tried to install firebase the system shows
the warning and stopped installing.

Screenshot_Firebase_install_error

This blocked the Raspberry Pi completely, so that only one solution remained, pulling the power plug. This is not a nice solution for a SD Card.

After powering up again and checking Node Red, Mosquitto and Domoticz, I decided to test the last dependency as well: rxjs

This resulted in the Error messages, as shown below:

So one problem is traced back to two other problems (Firebase and RxJS). Of course we can go some steps further by checking their dependencies as well, but as, at least, one other user had installed version 1.0.3. successfully, I want to check these to items first.

Has anybody a suggestion, where to look?

What sort of Pi is it an how long did you leave it?

Firebase and rxjs both install ok for me. What version of nodejs and npm are you running? You can check with
node -v
npm -v

Also that message involving the module inquirer are odd, what does this show
npm list inquirer

In fact, looking back at the start of the thread, it seems somehow your nodes have been messed up. You might be best to rename ~/.node-red/node_modules to something else and then (in the .node-red folder) run
npm install
That will re-install all the manualy installed nodes again. Then, if it goes ok, restart node-red. Some nodes can take a long time to install on an old pi so don't worry if it sits for ten minutes apparently doing nothing.

I would still like to know the nodejs and npm versions though.

Hi, @Colin

Thanks for your response.

What sort of Pi is it an how long did you leave it?

This is a Raspberry Pi 1B and I left it for about 10 minutes in this situation ( I think).
Perhaps I should left it longer, but the Pi was unresponsive.

What version of nodejs and npm are you running?

node -v gives me: v11.15.0. This is the latest version available for armv6 in the standard repo.
npm -v gives me: 7.10.0. As far as I know, this is also the latest.

npm list inquirer gives me:
/home/pi
└── (empty)

In fact, looking back at the start of the thread, it seems somehow your nodes have been messed up. You might be best to rename ~/.node-red/node_modules to something else and then (in the .node-red folder) run
npm install

I´m afraid that that has happened . Do not know why and how.
Will try to reinstall and will let you know.

Regards

Nodejs 11.x was never a supported version for node red. What version of Raspbian are you using? Normally I would recommend going to the node red docs page for getting started with a pi and running the install/update script there which will update you to a supported version. However I suspect you may be using such an old version of Raspbian that even that may show problems, so I suggested making an image backup of your SD card first, just in case.

Hi @Colin,

Nodejs 11.x was never a supported version for node red.

I know, in fact only the even number are/were supported, but it has worked for several years, without any problem. As said it is the latest version, you can find in the official nodeJS repo.

I would recommend going to the node red docs page for getting started with a pi and running the install/update script there which will update you to a supported version.

This install/update script will fail (experienced already once), because it will not find the required nodeJS version.

However I suspect you may be using such an old version of Raspbian.

What version of Raspbian are you using?

I´m running the latest Buster, with all updates installed.
Not running Buster, would not allow me to use the current version of Domoticz.

uname -a gives me:
Linux RPi1.jonasnet.nl 5.10.17+ #1403 Mon Feb 22 11:26:13 GMT 2021 armv6l GNU/Linux

So this is the latest Buster, as far as I know.

Tonight the "npm install" failed with warnings and an error.

npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! request to https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz failed, reason: Socket timeout

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-04-24T07_39_15_509Z-debug.log

The socket time out, I have to check, No idea why.

Regards

It works ok on a Pi Zero (is that the same architecture as a 1B?) and gets node 12 (I think). It gets them from https://unofficial-builds.nodejs.org/ I believe. I have 12.x on one of my Pis. You would be better with 10 than 11 though.

The socket timeout indicates that you have a network issue I believe.

Hello @Colin

It works ok on a Pi Zero (is that the same architecture as a 1B?) and gets node 12 (I think). It gets them from https://unofficial-builds.nodejs.org/ I believe. I have 12.x on one of my Pis. You would be better with 10 than 11 though.

Yes, the Raspberry Pi Zero has the same architecture as the first generation Raspberry Pi 1B (armv6). I had trouble to use the "official" Raspberry Pi install/update script.
This script pointed to Previous Releases | Node.js. In that time https://unofficial-builds.nodejs.org was not available.
If the script points now to https://unofficial-builds.nodejs.org it is worth to try once.
If 10 is better than 11? The odd numbers are the beta´s of the even numbers.

The socket timeout indicates that you have a network issue I believe.

After two failures with npm install, the third one has been successful and installed error free.
What remains were the 3 warnings:

npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

Do you suggest to look to that?

Afterwards also Smart Nora 1.0.3 installed without an error.

Restarted node-red and everything is fine now.

Indeed your suggestion to re-install all node_modules has been the solution, so in some respect it had been messed up. No idea why, but sometimes it happens.

Thanks for that.

I considered the issue as solved, unless you have suggestions regarding the warning.

Regards

The even numbers are the LTS versions (long term support) which will receive updates (bug fixes and security issues) for several years. The odd number versions are those where new features are added and old ones removed, and when that is all considered stable then the next even number is be released. Node red is tested against the LTS versions in order to have a stable spec to build on. The next major release of node-red (v2.x) will drop support for nodejs 8 and 10, needing at least 12.

Don't worry about warnings when installing nodes. Provided it says OK at the end then it should be fine.

You have the latest cutting edge version of npm and an ancient version of nodejs, whether there might be an issue there I don't know. Currently the LTS nodejs versions come with npm 6.14.12, I believe.

Hello @Colin,

I know it is a little bit off-topic, but I checked the contents of the "update-nodejs-and-nodered" script and indeed you will find the following line in this script:

tgta=12.22.1 # need armv6l latest from Index of /download/release/

This means that you can safely use this script to install and update Node-Red and currently it will install version 12.22.1, which is the latest. So I will use it for the next update again.

I tested everything and also updated to the latest Smart Nora version on my production machine, without any issues. Everything is working as one should expect.

Thanks again for your suggestion to install all the node modules again.

Regards

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