SQLITE3 on NR 1.0 Beta 3

SQLITE3 installs have always been a pain but at NR 0.20.8 it was just dine. Now, with 1.0 B3, SQLITE failed to install, along with serial and GPIO, the latter 2 just took an install, no problem, SQLITE3 needed an NPN REBUILD as has been advised in the past, and all looked well until tonight I tried to install the latest 1.0 compatible mifnight theme - and when I tried the npm install for the theme, instead, SQLITE 3 started again with the usual failed install, doing npm rebuild sqlite3 returned far too quickly - but suer enough sqlite3 was working - but no theme - I tried installing the theme again - back to square 1, bust SQLITE3.

I have the complete log file but the failure is at the end

npm ERR! errno 1
npm ERR! sqlite3@4.0.9 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@4.0.9 install script.

And what was the exact command line used ?

Hi Dave

I've given up after many hours (it is 2.10am here) wasted on that SQLITE issue - and gone back to NR 0.20.8 - with my new improved flows (multiple messages) so I'm ready to try again in a day or so. Is there a particular recommendation for upgrading nodejs and npm etc to upgrade to the beta.... clearly the way I did it didn't work well. When I first had issues with SQLITE tonight, in the .node-red directory (as user pi) I tried npm rebuild sqlite as such

npm rebuild sqlite3

That worked in the past - the rebuilt threw out warnings but worked. This time - no warnings, a minute or less - and all looked well (as you know I discovered all about using multiple messages in a flow to stop msg.payload getting overwritten. All was looking really rosy - until I tried installing a dark theme.. in the .node-red folder - it could most likely have been any addition.

npm install node-red-contrib-theme-midnight-red

At which point SQLITE started another failed install etc... I know at least one other user for whom the theme works perfectly - but he isn't using SQLITE... I could not even get the theme installed because of that SQLITE issue.

Ultimately, Nr 1.0 even refused to remove SQLITE - thats when I gave up.


we know (and have informed the author) that the dark theme is broken - though mainly due to CSS updates to make it more consistent and complete. So yes I would advise against that until it is fixed. Apart from that - if you didn't update the underlying node.js then there should be no need to rebuild sqlite itself. However if you do do it I would ensure you always use the --unsafe-perm flag when doing so - (and don't use sudo). Or to be sure npm i --unsafe-perm node-red-node sqlite@latest

Hi Dave

This morning I started over from scratch - using NR 0.20.8 as a base.

Here's what I did - and everything works, I hope this is helpful to others...it's all on my blog... however...

sudo npm install -g –unsafe-perm node-red@next

in the palette manager – I installed node-red-node-pi-gpio

cd ~/.node-red
npm install node-red-contrib-theme-midnight-red@next

Editing settings.js (sorry I forgot how to indent coded in here)

editorTheme: {
    page: {
        css: /home/pi/.node-red/node_modules/node-red-contrib-theme-midnight-red/midnight.css”

All working.. including the theme... which I find essential - I hate big white screens...

Granted, debug colours are not ideal but I'm sure in time that will be sorted. If I were better at css I'd fix that myself - as it is I don't know where to start... in debug for example, there's a grey "node ID" that is WAY too dark... then again in debug - under msg.payload.object - response object there's a purple and that grey again both of which need lightening up - if anyone wants to tell me what to adjust in that dark theme css file to brighten the text up, that would be really nice.