I have a node application using sqlite3 running perfectly fine on windows. However, when I send it over to my pi and try downloading the packages, sqlite3 doesn't work.
I get the following errors when trying to install :
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v57-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI) (falling back to source compile with node-gyp)
And the following when trying to run the program afterwards:
Error: Cannot find module '/var/Dash/node_modules/sqlite3/lib/binding/node-v57-linux-arm/node_sqlite3.node'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/var/Dash/node_modules/sqlite3/lib/sqlite3.js:4:15)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
node version: 8.9.4
Any help would be appreciated,
thanks
Did you try to build node-sqlite3 from source? Looks like there are no binaries for linux-arm.
https://github.com/mapbox/node-sqlite3#source-install
Just tried it and it gives me the same error message.
I tried installing sqlite3 instead of sqlite but now im stuck on the following:
make: Entering directory '/var/Dash/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o
Ok, fixed it, thank you @Nostradamos. That was it 馃憤
So you can close this, right @zerox029 ?
@zerox029 Could you share how do you fix that? I have the same issue to install on ARM.

sudo apt-get install libsqlite3-dev
npm install sqlite3 --build-from-source --sqlite=/usr
it works on my rpi3 - raspbian stretch lite
@zerox029 I'm having the same issue as @jyy1082. Could you please be more specific on how you solved this?
try with npm install sqlite3 --unsafe
sudo apt-get install libsqlite3-dev
npm install sqlite3 --build-from-source --sqlite=/usrit works on my rpi3 - raspbian stretch lite
FWIW
not working with raspbian buster rpi 3
sudo apt-get install libsqlite3-dev
npm install sqlite3 --build-from-source --sqlite=/usr
it works on my opi r1 - armbian 5.4.6-sunxi (Ubuntu bionic based Armbian for the Orange Pi R1 )
Most helpful comment
sudo apt-get install libsqlite3-dev
npm install sqlite3 --build-from-source --sqlite=/usr
it works on my rpi3 - raspbian stretch lite