I KNOW I’m not the only one who has issues with SQLITE3 in Raspberry Pi and Node-Red, so next time it happens to you… here is some invaluable info…
I just used the lines below on my second Raspberry Pi 4 which had been upgraded to Raspbian Buster (from Raspbian Stretch) some time ago.
As user PI… go to the /home/pi/.node-red directory
npm rebuild sqlite3
Be warned – the rebuild will throw out MANY warnings… (update April 2020 – the 4 lines above DO solve the problem – but you MUST be in the right directory as indicated) – Update October 2020 – the above still fixes SQLITE – I just noted while upgrading other nodes – that once again SQLITE needed an upgrade and in the pallette manager this failed. I stopped NR and ran the above – which worked but this is a CONSTANT pain as there is always the chance that this fix may not work. Always make a backup before upgrading SQLITE.
The above represents a TINY fraction of the warning messages you see during the rebuild.
That’s it, nothing else, just those 4 lines exactly as above and despite all those warnings, it works just fine. It will take several minutes for the rebuild to complete before you restart node-red.
But REALLY – the answer if possible is to DITCH SQLITE – this nonsense has been going on for YEARS… SQLITE in Node-Red is the ONLY package that gives me constant grief like this.