๐ŸŽ‰ Node-RED 1.2.6 released

So..

I tried (in .node-red folder) npm install node-red-node-sqlite node-red-node-serialport

That failed spectacularly - so reading Colin's comment I tried npm rebuild (assuming the .node-red folder) - that too failed spectacularly) - so I tried npm rebuild from the pi folder - and despite the usual garbage, that at least showed no errors. So I went back to .node-red folder and tried the npm install node-red-node-sqlite node-red-node-serialport again. Every time this takes an AGE - even on RPI4.

This time - the usual million warnings but no ERRORS - it seemed to work.

However on running Node-Red - no SQLITE

and again:

26 Nov 16:31:19 - [warn] [node-red-node-arduino/arduino] Missing serialport dependency
26 Nov 16:31:19 - [warn] [node-red-node-serialport/serialport] Error: The module '/home/pi/.node-red/node_modules/node-red-node-serialport/node_modules/@serialport/bindings/build/Release/bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install). (line:6)
26 Nov 16:31:19 - [warn] ------------------------------------------------------
26 Nov 16:31:19 - [info] Settings file : /home/pi/.node-red/settings.js
26 Nov 16:31:19 - [info] HTTP Static : /home/pi/.node-red/public
26 Nov 16:31:19 - [info] Context store : 'default' [module=localfilesystem]
26 Nov 16:31:19 - [info] User directory : /home/pi/.node-red
26 Nov 16:31:19 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
26 Nov 16:31:19 - [info] Flows file : /home/pi/.node-red/flows.json
26 Nov 16:31:19 - [info] Server now running at http://127.0.0.1:1880/
26 Nov 16:31:19 - [info] Waiting for missing types to be registered:
26 Nov 16:31:19 - [info] - sqlitedb
26 Nov 16:31:19 - [info] - sqlite

So no serialport and no sqlite.

So, back to 1.2.5 for now.... keep any ideas flowing please.

It is hard to suggest what is going wrong if you don't provide any details and just say it failed.

Given the log out you have shared, then you could try:

cd /home/pi/.node-red/node_modules/node-red-node-serialport
npm rebuild

That won't fix the sqlite issues, but one thing at a time.

You haven't somehow got multiple versions of nodejs installed have you?

Sorry nick - I was trying to avoid criticism for filling the forum up with code... my home control won't work without SQLITE so that's a must. And of course node-red won;t start up while it's still griping about the missing SQLITE modules... (Colin - as far as I'm aware I only have what Node-Red puts in there. The issues with SQLITE and serialport are by no means new but after Node-red 1.01 through 1.2.4 they were no problem - 1.2.5 no problem as long as I dion't try updating SQLITE (pallette Manager) - but now at 1.2.6 - NR is trying to force the update - presumably along with the NPM update.

So...
Firstly - remove i2c from .node-red/settings.js
Secondly - ```
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)


I've kept the log - attached here - discourse would not let me so I added .txt on the end[nodered-install.log.txt|attachment](upload://s7RAKw4hLgaUYbMbd2m3EWhxZ0p.txt) (12.2 KB) .

then:
cd /home/pi/.node-red/node_modules/node-red-node-serialport
npm rebuild

then missing out reams or warnings... as nick suggested, sqlite is out (and of course I already commented out i2c).

26 Nov 16:57:10 - [warn] ------------------------------------------------------
26 Nov 16:57:10 - [warn] [node-red-node-arduino/arduino] Missing serialport dependency
26 Nov 16:57:10 - [warn] [node-red-node-sqlite/sqlite] Error: Cannot find module '/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v72-linux-arm/node_sqlite3.node'
Require stack:
- /home/pi/.node-red/node_modules/sqlite3/lib/sqlite3.js
- /home/pi/.node-red/node_modules/node-red-node-sqlite/sqlite.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js
26 Nov 16:57:10 - [warn] ------------------------------------------------------
26 Nov 16:57:10 - [info] Settings file  : /home/pi/.node-red/settings.js
26 Nov 16:57:10 - [info] HTTP Static    : /home/pi/.node-red/public
26 Nov 16:57:10 - [info] Context store  : 'default' [module=localfilesystem]
26 Nov 16:57:10 - [info] User directory : /home/pi/.node-red
26 Nov 16:57:10 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
26 Nov 16:57:10 - [info] Flows file     : /home/pi/.node-red/flows.json
26 Nov 16:57:10 - [info] Server now running at http://127.0.0.1:1880/
26 Nov 16:57:10 - [info] Waiting for missing types to be registered:
26 Nov 16:57:10 - [info]  - sqlitedb
26 Nov 16:57:10 - [info]  - sqlite
^C26 Nov 16:58:32 - [info] Stopping flows
26 Nov 16:58:32 - [info] Stopped flows


Finally I tried going into the node-red-node-sqlite folder and "npm rebuild"
No error but came back almost instantly

In .node-red I tried what worked months ago - in .noide-red
npm install sqlite3

Shed load of warnings and several minutes later

same result...

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.1.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@4.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2020-11-26T16_12_37_361Z-debug.log

It looks like it isn't complaining about the Serial node anymore when it starts up? That's a good step forward.

Lets get sqlite working.

cd .node-red
npm install sqlite3

I had the same error-message about 'sqlite' when I upgraded to 1.2.6 on one of my RPi.

To fix it I did...
cd .node-red

Then ran...
npm rebuild sqlite3

Worked for me.

PS:
I think Nick beat me to it by a few seconds !!!

1 Like

Nick - as you were writing that I was doing a prope logginfg job to put in here and also did the SQLITE3

heres the last log - again - failure...

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.1.1 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@4.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-11-26T16_12_37_361Z-debug.log

To keep this in perspective, in the past I've overcome all sorts of issues and kept serialpotr and sqlite working - this is the first time in maybe a year I'm lost..
2020-11-26T16_12_37_361Z-debug.log.txt (227.6 KB)

That has always worked for me until now. Anyway after a final attempt at adding in "npm rebuild sqlite3" - sqlite and serial SEEM to work but..

[node-red-node-arduino/arduino] Missing serialport dependency

But I don;t know if that is the actual serial port or something else...

Also of course, I2c remains comment out so no further forward there.

With that last npn upgrade SQLITE3 added in, this is what the (no i2c) startup now looks like.

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.18:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
26 Nov 17:37:32 - [info]
Welcome to Node-RED

26 Nov 17:37:32 - [info] Node-RED version: v1.2.6
26 Nov 17:37:32 - [info] Node.js version: v12.20.0
26 Nov 17:37:32 - [info] Linux 5.4.72-v7l+ arm LE
26 Nov 17:37:32 - [info] Loading palette nodes
26 Nov 17:37:36 - [info] Worldmap version 2.6.0
26 Nov 17:37:37 - [info] Dashboard version 2.24.0 started at /ui
It looks like serialport didn't install properly.
More information can be found here https://serialport.io/docs/guide-installation
The result of requiring the package is: undefined
Error: The module '/home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1057:18)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at bindings (/home/pi/.node-red/node_modules/@serialport/bindings/node_modules/bindings/bindings.js:112:48)
at Object. (/home/pi/.node-red/node_modules/@serialport/bindings/lib/linux.js:2:36)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/pi/.node-red/node_modules/@serialport/bindings/lib/index.js:14:22)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/pi/.node-red/node_modules/serialport/lib/index.js:2:17)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/pi/.node-red/node_modules/firmata/lib/com.js:44:18)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/pi/.node-red/node_modules/firmata/lib/firmata.js:3:40)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
26 Nov 17:37:37 - [warn] ------------------------------------------------------
26 Nov 17:37:37 - [warn] [node-red-node-arduino/arduino] Missing serialport dependency
26 Nov 17:37:37 - [warn] ------------------------------------------------------
26 Nov 17:37:37 - [info] Settings file : /home/pi/.node-red/settings.js
26 Nov 17:37:37 - [info] HTTP Static : /home/pi/.node-red/public
26 Nov 17:37:37 - [info] Context store : 'default' [module=localfilesystem]
26 Nov 17:37:37 - [info] User directory : /home/pi/.node-red
26 Nov 17:37:37 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
26 Nov 17:37:37 - [info] Flows file : /home/pi/.node-red/flows.json
26 Nov 17:37:38 - [info] Server now running at http://127.0.0.1:1880/
26 Nov 17:37:38 - [info] Starting flows
26 Nov 17:37:39 - [info] Started flows
26 Nov 17:37:39 - [info] [sqlitedb:6e9a0125.59bc4] opened /home/pi/dbs/iot.db ok
26 Nov 17:37:39 - [info] [sqlitedb:fdbe27fe.fb7848] opened /home/pi/dbs/iot.db ok
26 Nov 17:37:39 - [info] [sqlitedb:33875a87.57ade6] opened /home/pi/dbs/iot.db ok
26 Nov 17:37:39 - [info] [mqtt-broker:4c682b3a.2ab5c4] Connected to broker: mqtt://127.0.0.1:1883

I'm confused now. This latest log shows it is complaining about serialport again... but the log output you shared 40 minutes ago didn't complain about the serialport.

Indeed and after all that, because SQLITE was now working - I had a nother go with serialport

pi@rpi418buster:.node-red:17:43[0]> npm install node-red-node-serialport

and NOW, SQLITE has sopped again thanks to the attempte serialport install.

Here's the last unfeasibly lasrge log. I'm not sure what planet the SQLITE module designer was on - but there is a TON of utterly useless info in there.. end result..sqlite is no longer working.. which makes it extremely difficult to analyse the issue.

2020-11-26T16_46_47_967Z-debug.log.txt (226.4 KB)

sure enough - SQLITE is dead again. SO from DynamicDave - the sqlite3 rebuild in the ,node-red folder... erm, no... witing fot mssing types - no further forward -..

Could the arduino node be forcing an older version of the serial node, so that there are two versions of it installed?

Whether or not there are other versions is beyond me - that Arduino node is nothing new, it's been in there for a couple of years..

Thank you for your time, chaps. I'm out of time for today so I've reverted back to 1.2.5 for now. I know, not a good solution but this could go in circles for days.

Thanks again.

I have just looked in package.json and in devdepencies it has
"node-red": "^1.1.3",
which I think means that it won't like 1.2.x, but I don't know what the significance of that is. Does it mean it will install another version of node-red locally for itself?

With your working system, what do these commands give?
npm list -g node-red
npm list node-red

[Edit] From the .node-red folder obviously.

Working as in 1.2.5

npm list -g node-red

/usr/lib

โ””โ”€โ”€ node-red@1.2.5

npm list node-red

/home/pi

โ””โ”€โ”€ (empty)

Regards

Pete

will accept 1.1 -> 1.anything.
~1.1.3 would mean 1.1.3 -> 1.1.anything

Methinks perhaps you forgot to go to the .node-red folder, though as Dave has pointed out I think my suggestion is a red herring anyway.

You are correct of course, I can never remember which is which so always look it up, but even then I get it wrong. Sorry.

Very unlikely I forgot to go to the .node-red folder :blush: I've done this many times over the past couple of years. Anything is possible. I'll read Daves post as soon as I've finished collecting Black Friday bargains.

Pete

I generally do a cp -R of my Node-RED folder before doing a big upgrade. Got caught out a few times previously by not doing that. By doing a full copy, it is easy to back out. I'll generally do that before a big node.js upgrade too. Better safe than sorry.