I'm trying to set up a small home automation server using a Raspberry Pi Zero W. I've got the code I want to use working on my laptop and trying to export it across to my raspberry pi. the 2 extra Nodes I need for my project are Dashboard and sqlite, dashboard installs and works just fine. However SQLite is a pig to install! it seems a lot a people have issues with this but I can't find a solution that works for me. Everytime I try to install it fails on:
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.6/node-v64-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.0.6 and node@10.15.1 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/pi/.node-red/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3260000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3260000/sqlite3.o
And it didn't do the compilation steps ? It should have done...
(unless it had succeeded before...) in which case stop and restart both Node-RED and the browser.
I've restarted both, still get the same warning on node-red-start, the node shows up in the pallete manager with a warning triangle against and the option to disable it, although the actual node is not on the tool bar to use?
Just flashed a new SD card with stretch lite 2018-11-13 and stuck it into a Pi zero W
did an apt-get update/upgrade
sudo apt-get install sqlite3
installed NR using the script
ran npm i --unsafe-perm node-red-node-sqlite
started NR v0.19.6 node.js v10.15.1
created nodes to create a table, insert a row and retreive the row
It all works fine.
One thing. Originally I pulled an SD card from a pi3 and tried to use that and you can't because of the arm7 vrs arm6 issue (pizerow is arm6)
Even if it comes pre-installed, I would always suggest running the update script on the raspberry pi page in the docs yo ensure you have the latest recommended versions or node-red, nodejs, npm and all the pre-installed nodes.
The pre-installed version of Node.JS always used to be an old version and without npm which is a bit crazy as you are always going to need npm with Node. I personally never recommend installing npm separate to Node.JS as there have been times in the past when the latest version of npm didn't work well with the LTS version of Node.
As @ukmoose says, you should use Dave's script to get everything in working order. Not only will you get the right version of Node and npm, everything else gets set up as well.
One thing though, I'm not sure whether Dave's script includes build-essentials? I think you need that.