# Can't instal SQLite on node-red

**URL:** https://discourse.nodered.org/t/cant-instal-sqlite-on-node-red/5966
**Category:** General
**Created:** [19 December 2018 15:19 UTC](https://discourse.nodered.org/t/cant-instal-sqlite-on-node-red/5966 "2018-12-19T15:19:24Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![PicoPi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picopi/32/4832_2.png) [@PicoPi](https://discourse.nodered.org/u/PicoPi)
#### Post date: [19 December 2018 15:19 UTC](https://discourse.nodered.org/t/cant-instal-sqlite-on-node-red/5966/1 "2018-12-19T15:19:24Z")

</div>

My Node-red is working fine on my RPI2, but I can't install SQLite!  
Here is what I do and what I get.

_pi@RPI2:~/.node-red $ sudo npm install node-red-node-sqlite_  
_npm WARN node-red-project@0.0.1 No repository field._  
_npm WARN node-red-project@0.0.1 No license field._

_+ node-red-node-sqlite@0.3.5_  
_updated 1 package and audited 1017 packages in 40.703s_  
_found 0 vulnerabilities_

_pi@RPI2:~/.node-red $_

I tried installing it from the node-red "manage pallet" tab.  
No errors are returned.  
Can anyone help me resolve this issue?  
I've also upgraded to the latest versions of everything including n and npm;  
sudo n latest  
sudo npm install -g npm

---

<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: [19 December 2018 15:22 UTC](https://discourse.nodered.org/t/cant-instal-sqlite-on-node-red/5966/2 "2018-12-19T15:22:04Z")

</div>

Hi @PicoPi

You should not use `sudo` when installing modules in `~/.node-red` as it will muck up your file permissions.

The output you've shared shows a completely successful install of the sqlite module.

Have you restarted Node-RED?

Have you checked the Node-RED log on startup to see if there are any error messages related to the module?

---

<div class="post-metadata">

### Author: ![PicoPi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picopi/32/4832_2.png) [@PicoPi](https://discourse.nodered.org/u/PicoPi)
#### Post date: [19 December 2018 15:24 UTC](https://discourse.nodered.org/t/cant-instal-sqlite-on-node-red/5966/3 "2018-12-19T15:24:06Z")

</div>

Thanks for the quick rely.  
I've rebooted the Pi a couple of times.  
where can I check for the log file?

---

<div class="post-metadata">

### Author: ![PicoPi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picopi/32/4832_2.png) [@PicoPi](https://discourse.nodered.org/u/PicoPi)
#### Post date: [19 December 2018 15:25 UTC](https://discourse.nodered.org/t/cant-instal-sqlite-on-node-red/5966/4 "2018-12-19T15:25:34Z")

</div>

The reason I used sudo was that I got a bunch of permission errors

---

<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: [19 December 2018 15:47 UTC](https://discourse.nodered.org/t/cant-instal-sqlite-on-node-red/5966/5 "2018-12-19T15:47:58Z")

</div>

Which was telling you that you have a larger issue. You most likely need to save you flows, uninstall Node-RED (and possibly Node.JS), certainly remove all your global npm packages and rename your userDir folder (probably ~/.node-red).

Then carefully follow the installation instructions.

Only Node-RED itself needs to be installed globally in a standard installation. If you get errors when installing nodes from the palette, come back to us with the errors and we can help you sort it out.

---

<div class="post-metadata">

### Author: ![PicoPi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picopi/32/4832_2.png) [@PicoPi](https://discourse.nodered.org/u/PicoPi)
#### Post date: [19 December 2018 16:19 UTC](https://discourse.nodered.org/t/cant-instal-sqlite-on-node-red/5966/6 "2018-12-19T16:19:05Z")

</div>

It was working fine until I decided to install sqlite.  
I don't have the knowledge to do all you suggested.  
I have a backup of my SD card. I'll revert back to it.  
Thanks.

---

<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: [19 December 2018 19:47 UTC](https://discourse.nodered.org/t/cant-instal-sqlite-on-node-red/5966/7 "2018-12-19T19:47:06Z")

</div>

once reverted you should be able to do

```
cd ~/.node-red
npm i --unsafe-perm node-red-node-sqlite
```

---

<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: [20 December 2018 17:34 UTC](https://discourse.nodered.org/t/cant-instal-sqlite-on-node-red/5966/8 "2018-12-20T17:34:58Z")

</div>

Sorry for the late response.  
This problem you are having is a very common issue.  
Please check this answer: [Sqlite doesn t work after update](https://discourse.nodered.org/t/sqlite-doesn-t-work-after-update/1830/12?u=machadotiago) about how to install the SQLite node on a Rpi

---

<div class="post-metadata">

### Author: ![PicoPi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picopi/32/4832_2.png) [@PicoPi](https://discourse.nodered.org/u/PicoPi)
#### Post date: [30 December 2018 04:32 UTC](https://discourse.nodered.org/t/cant-instal-sqlite-on-node-red/5966/9 "2018-12-30T04:32:01Z")

</div>

Thanks for the reply.  
I managed to install it from the command line. It does take a long time, but It showed up under "Storage" nodes after that.  
Just to make sure and experiment a bit more, I then went back to a fresh install of Rasbian, and this time, installed it from inside Node-Red using "Manage Pallets".  
It also worked but took a long time.  
Thanks again for the heads up.  
~A happy camper
