# Conflict between node-red-node-sqlite and node-red-contrib-sqlitedb

**URL:** <https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736>\
**Category:** General\
**Created:** [10 February 2021 08:52 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736 "2021-02-10T08:52:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rikki78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rikki78/32/36865_2.png) [@rikki78](https://discourse.nodered.org/u/rikki78)\
**Post date:** [10 February 2021 08:52 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/1 "2021-02-10T08:52:34Z")

</div>

Hi there,  
Yesterday I have updated node-red (in Home Assistant) and since that there is a conflict between node-red-node-sqlite and node-red-contrib-sqlitedb.

How can I resolve this issue? node-red-contrib-sqlitedb is required for another add-on, node-red-contrib-mysensors

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/a/5a5a27637fd817aa6914516eb84c4cb27e672e58.png)

---

<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:** [10 February 2021 09:19 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/2 "2021-02-10T09:19:57Z")

</div>

You cannot have both of those modules installed at the same time - they both provide a node type with the same id.

You'll need to uninstall one of them.

---

<div class="post-metadata">

**Author:** ![rikki78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rikki78/32/36865_2.png) [@rikki78](https://discourse.nodered.org/u/rikki78)\
**Post date:** [12 February 2021 04:18 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/3 "2021-02-12T04:18:39Z")

</div>

Thanks for your answer. The strange thing is that I've had these two installed together for at least a year but only after this recent update, I have this error. What is changed that causes this?

What can I do to make the mysensors node work based on the sqlite node?

---

<div class="post-metadata">

**Author:** ![rikki78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rikki78/32/36865_2.png) [@rikki78](https://discourse.nodered.org/u/rikki78)\
**Post date:** [20 March 2021 14:06 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/4 "2021-03-20T14:06:11Z")

</div>

Hi can you have a look again? I have re-installed the sqlite node and now I no longer have a conflict, but the sqlite node gives this error.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/8/d89aad57fd8daf9f4868d2f39132b5b0039bccb5.png)

When I deploy, I get this error  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5d36f2cc147ee4f3cb325fa8c8863220fbfa8ca2.png)

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [20 March 2021 15:57 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/5 "2021-03-20T15:57:34Z")

</div>

Hi.

What version of Node.js do you have installed ?  
You can check with `node -v`

I believe the current Sqlite node version doesnt support a node.js version higher than v12.20.2  
Read this related [thread](https://discourse.nodered.org/t/unable-to-install-sqlite/41878)

---

<div class="post-metadata">

**Author:** ![rikki78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rikki78/32/36865_2.png) [@rikki78](https://discourse.nodered.org/u/rikki78)\
**Post date:** [20 March 2021 16:13 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/6 "2021-03-20T16:13:59Z")

</div>

I'm running home assistant, so I assume it is a later version of node. I will try to find out the version. Thanks

---

<div class="post-metadata">

**Author:** ![NodeC](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@NodeC](https://discourse.nodered.org/u/NodeC)\
**Post date:** [21 March 2021 02:25 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/7 "2021-03-21T02:25:58Z")

</div>

yes indeed. sqlite only for node.js v12.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 March 2021 09:00 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/8 "2021-03-21T09:00:08Z")

</div>

node-red-node-sqlite current version 0.6.0 installs ok for me on Ubuntu with nodejs 14.16.0

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [21 March 2021 22:07 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/9 "2021-03-21T22:07:43Z")

</div>

Hi @Colin .. yea possibly on Ubuntu it works without issue because the sqlite3 pre-built binaries are available for Nodejs v14 for that OS.  
The problem I and @NodeC was facing was on windows systems with an error.  
`node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.2.0 and node@14.16.0`  
One way to solve it was to downgrade to node v12.

I had some time in the weekend and updated nodejs again to v14 on my win10 test system and followed @Steve-Mcl suggestion to install the windows build tools  
`npm install --global windows-build-tools`  
and that did the trick.  
Sqlite node installed and seems to be working.

ps. Sorry @rikki78 if this is totally unrelated to your issue.

---

<div class="post-metadata">

**Author:** ![rikki78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rikki78/32/36865_2.png) [@rikki78](https://discourse.nodered.org/u/rikki78)\
**Post date:** [27 March 2021 13:21 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/10 "2021-03-27T13:21:39Z")

</div>

So I have checked the node version, which is v14.16.0  
node-red-node-sqlite is v0.6, and I'm running on Ubuntu 20.04.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 March 2021 13:41 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/11 "2021-03-27T13:41:46Z")

</div>

In a terminal go to your .node-red folder and run  
`npm remove node-red-node-sqlite`  
`npm install node-red-node-sqlite`

and copy/paste the output here please.

---

<div class="post-metadata">

**Author:** ![rikki78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rikki78/32/36865_2.png) [@rikki78](https://discourse.nodered.org/u/rikki78)\
**Post date:** [27 March 2021 14:12 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/12 "2021-03-27T14:12:20Z")

</div>

```auto

root@a0d7b954-nodered:/config/node-red/node_modules$ npm remove node-red-node-sqlite
removed 1 package and audited 308 packages in 2.107s

16 packages are looking for funding
  run `npm fund` for details

found 15 vulnerabilities (10 low, 5 high)
  run `npm audit fix` to fix them, or `npm audit` for details

   ╭───────────────────────────────────────────────────────────────╮
   │ │
   │ New major version of npm available! 6.14.11 → 7.7.5 │
   │ Changelog: https://github.com/npm/cli/releases/tag/v7.7.5 │
   │ Run npm install -g npm to update! │
   │ │
   ╰───────────────────────────────────────────────────────────────╯

root@a0d7b954-nodered:/config/node-red/node_modules$ npm install node-red-node-sqlite
+ node-red-node-sqlite@0.6.0
added 1 package from 1 contributor and audited 309 packages in 2.736s

16 packages are looking for funding
  run `npm fund` for details

found 17 vulnerabilities (12 low, 5 high)
  run `npm audit fix` to fix them, or `npm audit` for details

   ╭───────────────────────────────────────────────────────────────╮
   │ │
   │ New major version of npm available! 6.14.11 → 7.7.5 │
   │ Changelog: https://github.com/npm/cli/releases/tag/v7.7.5 │
   │ Run npm install -g npm to update! │
   │ │
   ╰───────────────────────────────────────────────────────────────╯

root@a0d7b954-nodered:/config/node-red/node_modules$

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 March 2021 14:59 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/13 "2021-03-27T14:59:25Z")

</div>

Why are you running as root? The root account on Ubuntu is disabled by default and should not normally be enabled unless you have a good reason and know what you are doing.

Also I draw your attention to what I suggested, pay particular note to the bit about the folder.

> [@Colin](#):
>
> In a terminal go to your .node-red folder and run

---

<div class="post-metadata">

**Author:** ![rikki78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rikki78/32/36865_2.png) [@rikki78](https://discourse.nodered.org/u/rikki78)\
**Post date:** [27 March 2021 15:07 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/14 "2021-03-27T15:07:12Z")

</div>

I'm running home assistant, and node red is running in docker. To be able to access the container I have to be root.  
The node red node modules are installed in this config folder and therefore I've run this command there. In this folder all the modules are installed, also when they are installed through the palette.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 March 2021 15:09 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/15 "2021-03-27T15:09:35Z")

</div>

OK, I don't know anything about that environment, so may not be able to help.

I presume you can see the node-red startup log somewhere. What does it show when you start node-red?

---

<div class="post-metadata">

**Author:** ![rikki78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rikki78/32/36865_2.png) [@rikki78](https://discourse.nodered.org/u/rikki78)\
**Post date:** [27 March 2021 15:20 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/16 "2021-03-27T15:20:02Z")

</div>

Good point! Something is mentioned about sqlite.

```auto

27 Mar 16:18:09 - [warn] ------------------------------------------------------
27 Mar 16:18:09 - [warn] [node-red-contrib-mysensors/mysdb] Error: Cannot find module '/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node'
Require stack:
- /config/node-red/node_modules/sqlite3/lib/sqlite3-binding.js
- /config/node-red/node_modules/sqlite3/lib/sqlite3.js
- /config/node-red/node_modules/sqlite/main.js
- /config/node-red/node_modules/node-red-contrib-mysensors/dist/lib/database-sqlite.js
- /config/node-red/node_modules/node-red-contrib-mysensors/dist/nodes/mysensors-db.js
- /opt/node_modules/@node-red/registry/lib/loader.js
- /opt/node_modules/@node-red/registry/lib/index.js
- /opt/node_modules/@node-red/runtime/lib/nodes/index.js
- /opt/node_modules/@node-red/runtime/lib/index.js
- /opt/node_modules/node-red/lib/red.js
- /opt/node_modules/node-red/red.js

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 March 2021 15:35 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/17 "2021-03-27T15:35:54Z")

</div>

> [@rikki78](#):
>
> `node-red-contrib-mysensors`

That is a problem with a dependency on that node. I suggest removing and re-installing that one (assuming you are using it).

---

<div class="post-metadata">

**Author:** ![rikki78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rikki78/32/36865_2.png) [@rikki78](https://discourse.nodered.org/u/rikki78)\
**Post date:** [27 March 2021 16:08 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/18 "2021-03-27T16:08:35Z")

</div>

Thanks for the hint.  
Is there any chance, removing the node and reinstalling will break it? I'm asking because it is used in quite some flows and if this doesn't work, the WAF will be greatly reduced if you understand what I mean 😉

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 March 2021 16:31 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/19 "2021-03-27T16:31:36Z")

</div>

Unlikely I would have thought, but I wouldn't guarantee it.

Can you post the full startup log, there may be something you are missing.

---

<div class="post-metadata">

**Author:** ![rikki78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rikki78/32/36865_2.png) [@rikki78](https://discourse.nodered.org/u/rikki78)\
**Post date:** [27 March 2021 16:44 UTC](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736/20 "2021-03-27T16:44:47Z")

</div>

Yes sure:

```auto
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] customizations.sh: executing... 
[cont-init.d] customizations.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] node-red.sh: executing... 
[17:42:46] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[17:42:47] INFO: Password is NOT in the Have I Been Pwned database! Nice!
patching file nodes/ui_base.html
Hunk #1 succeeded at 1159 (offset 628 lines).
audited 309 packages in 1.996s
16 packages are looking for funding
  run `npm fund` for details
found 17 vulnerabilities (12 low, 5 high)
  run `npm audit fix` to fix them, or `npm audit` for details
[cont-init.d] node-red.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[17:42:50] INFO: Starting Node-RED...
> addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
27 Mar 17:42:50 - [info] 
Welcome to Node-RED
===================
27 Mar 17:42:50 - [info] Node-RED version: v1.2.9
27 Mar 17:42:50 - [info] Node.js version: v14.16.0
27 Mar 17:42:50 - [info] Linux 5.8.0-45-generic x64 LE
27 Mar 17:42:51 - [info] Loading palette nodes
27 Mar 17:42:52 - [info] Dashboard version 2.28.1 started at /endpoint/ui
/bin/sh: /opt/node_modules/node-red-node-pi-gpio/testgpio.py: not found
27 Mar 17:42:53 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
27 Mar 17:42:53 - [warn] ------------------------------------------------------
27 Mar 17:42:53 - [warn] [node-red-contrib-mysensors/mysdb] Error: Cannot find module '/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node'
Require stack:
- /config/node-red/node_modules/sqlite3/lib/sqlite3-binding.js
- /config/node-red/node_modules/sqlite3/lib/sqlite3.js
- /config/node-red/node_modules/sqlite/main.js
- /config/node-red/node_modules/node-red-contrib-mysensors/dist/lib/database-sqlite.js
- /config/node-red/node_modules/node-red-contrib-mysensors/dist/nodes/mysensors-db.js
- /opt/node_modules/@node-red/registry/lib/loader.js
- /opt/node_modules/@node-red/registry/lib/index.js
- /opt/node_modules/@node-red/runtime/lib/nodes/index.js
- /opt/node_modules/@node-red/runtime/lib/index.js
- /opt/node_modules/node-red/lib/red.js
- /opt/node_modules/node-red/red.js
27 Mar 17:42:53 - [warn] [node-red-node-sqlite/sqlite] Error: Cannot find module '/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node'
Require stack:
- /config/node-red/node_modules/sqlite3/lib/sqlite3-binding.js
- /config/node-red/node_modules/sqlite3/lib/sqlite3.js
- /config/node-red/node_modules/node-red-node-sqlite/sqlite.js
- /opt/node_modules/@node-red/registry/lib/loader.js
- /opt/node_modules/@node-red/registry/lib/index.js
- /opt/node_modules/@node-red/runtime/lib/nodes/index.js
- /opt/node_modules/@node-red/runtime/lib/index.js
- /opt/node_modules/node-red/lib/red.js
- /opt/node_modules/node-red/red.js
27 Mar 17:42:53 - [warn] ------------------------------------------------------
27 Mar 17:42:53 - [info] Settings file : /etc/node-red/config.js
27 Mar 17:42:53 - [info] Context store : 'default' [module=memory]
27 Mar 17:42:53 - [info] User directory : /config/node-red/
27 Mar 17:42:53 - [warn] Projects disabled : editorTheme.projects.enabled=false
27 Mar 17:42:53 - [info] Flows file : /config/node-red/flows.json
27 Mar 17:42:53 - [info] Server now running at http://127.0.0.1:46836/

```

Here after flows are started, I assume these are not needed.

[Next page](https://discourse.nodered.org/t/conflict-between-node-red-node-sqlite-and-node-red-contrib-sqlitedb/40736.md?page=2)
