# Sqlite doesn t work after update

**URL:** <https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830>\
**Category:** General\
**Created:** [26 July 2018 12:33 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830 "2018-07-26T12:33:37Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [26 July 2018 12:33 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/1 "2018-07-26T12:33:37Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [26 July 2018 13:02 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/2 "2018-07-26T13:02:08Z")

</div>

```
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](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..

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [26 July 2018 13:30 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/3 "2018-07-26T13:30:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [26 July 2018 13:40 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/4 "2018-07-26T13:40:11Z")

</div>

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

> [@YT2310](#):
>
> Error: Cannot find module '/home/pi/.node-red/node\_modules/sqlite3/lib/binding/node-v57-linux-arm/node\_sqlite3.node' (line:4)

---

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [26 July 2018 13:44 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/5 "2018-07-26T13:44:50Z")

</div>

![Unbenannt](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/c263fcc811c7b33d28ef8ab026d27b18fda65206.JPG)

---

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [26 July 2018 13:53 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/6 "2018-07-26T13:53:54Z")

</div>

is there no Chance to get the older Version back?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [26 July 2018 14:17 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/7 "2018-07-26T14:17:15Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 July 2018 14:44 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/8 "2018-07-26T14:44:17Z")

</div>

Or maybe

```
 npm i —unsafe-perm sqlite3

```

Which maybe required to let the compiler do its thing

---

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [26 July 2018 14:45 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/9 "2018-07-26T14:45:59Z")

</div>

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

> [@knolleary](#):
>
> The common fix is to try reinstalling the sqlite3 module. In the directory `/home/pi/.node-red/` try running `npm install sqlite3`

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](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

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [26 July 2018 15:08 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/10 "2018-07-26T15:08:44Z")

</div>

> [@YT2310](#):
>
> is there no Chance to get the older Version back?

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.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [26 July 2018 15:14 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/11 "2018-07-26T15:14:43Z")

</div>

> [@YT2310](#):
>
> 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](https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.2/node-v57-linux-arm.tar.gz)

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?

---

<div class="post-metadata">

**Author:** ![machadotiago](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/machadotiago/32/23776_2.png) [@machadotiago](https://discourse.nodered.org/u/machadotiago)\
**Post date:** [26 July 2018 19:31 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/12 "2018-07-26T19:31:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [26 July 2018 22:53 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/13 "2018-07-26T22:53:06Z")

</div>

> [@machadotiago](#):
>
> If your hardware is older than the Pi3 maybe 15 minutes is enough.

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.

---

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [27 July 2018 05:45 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/14 "2018-07-27T05:45:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![slugger1205](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@slugger1205](https://discourse.nodered.org/u/slugger1205)\
**Post date:** [24 December 2018 23:04 UTC](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/15 "2018-12-24T23:04:07Z")

</div>

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