Sqlite doesn t work after update

Hello,
I install the new npm update for sqlite but now there is the following error, does any one now how to fix this?
Error: Cannot find module '/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v57-linux-arm/node_sqlite3.node' (line:4)

pi@raspberrypi:~/.node-red $ npm install node-red-node-sqlite

sqlite3@4.0.2 install /home/pi/.node-red/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

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.2/node-v57-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.0.2 and node@8.11.3 (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
make: Verzeichnis „/home/pi/.node-red/node_modules/sqlite3/build“ wird betreten
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3240000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3240000/sqlite3.o

This is what the comand window says..

I don't think that is all of the message. You got the warning that there is no pre-built binary but not the error that made the build fail - which is what I suspect happened. Try deleting /home/pi/.node-red/node_modules/sqlite3 and /home/pi/.node-red/node_modules/node-red-node-sqlite then install again to see if that helps.

Otherwise, check the sqlite3 npm/github site and raise an issue there.

I already tried this but there is still no result, if i try to install via package Manager i got the error

Unbenannt

is there no Chance to get the older Version back?

Can you confirm what versions of node.js and npm you are using?

If you google that error you'll find lots of very similar reports with the sqlite3 module. I suggest you look at how they are resolved elsewhere.

The common fix is to try reinstalling the sqlite3 module. In the directory /home/pi/.node-red/ try running npm install sqlite3

Or maybe

 npm i —unsafe-perm sqlite3

Which maybe required to let the compiler do its thing

the node.js Version is v8.11.3
the npm Version is 6.1.0

I tried but there is missing the file

pi@raspberrypi:~/.node-red $ npm install sqlite3

sqlite3@4.0.2 install /home/pi/.node-red/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

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.2/node-v57-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.0.2 and node@8.11.3 (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
make: Verzeichnis „/home/pi/.node-red/node_modules/sqlite3/build“ wird betreten
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3240000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3240000/sqlite3.o

Yes, if it will install. You have to do it from the command line using npm - look up the info on installing node modules on the npm site.

I've confirmed manually that access to the file requires authorisation hence the 403 error.

You haven't installed something as root by mistake have you?

Or do you have a spare device to try? I assume you are on a Pi?

I have exactly the same problem here on my RPi3 and I recently I found the solution, check if it works for you.

  1. Open a fresh installation of Node-RED
  2. Go to Manage Pallet
  3. Select the sqlite node and install it
  4. Do not touch the system for at least 10 minutes (even if the Node-RED interface tells you that the installation is done)

If your hardware is older than the Pi3 maybe 15 minutes is enough.

This happens because the compilation process of the sqlite binaries happens in background and it takes a looong time to compile in the RPi hardware.

3 Likes

In this case, I would strongly advise using the command line to install since you will be able to see what is going on and it should be completely clear when everything is finished.

1 Like

Thank you after I try your steps it works normal :slight_smile:
But i don t Need a fresh node red it was also fine without step 1

Thanks. It worked.
Didn't have to use step 1 either.