Introducing the SQLite3 Node for n8n

HI Mariem,

in the main README.md

If you are running this node outside of docker apline provided by n8n you may ended up having this issue: libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory. You can try adding the optional parameter use default bindings and turn it on.

In your node you have extra options one of them is called
Use Custom Bindings

please select this one and provide the bindings according to your operative system.

you can find them here.

you probably are using windows so this one may seems solid
https://github.com/WiseLibs/better-sqlite3/releases/download/v12.6.0/better-sqlite3-v12.6.0-node-v141-win32-x64.tar.gz

Unpack it and provide it as a path.

It should work

Having issues with the node not seeing the directory with the database:

Cannot open database because the directory does not exist

DB pat is /home/[username]/AgentPrompts/WazuhAlerts/wazuh_alerts.db

Here is the full error text:

TypeError: Cannot open database because the directory does not exist at new Database (/home/node/.n8n/nodes/node_modules/n8n-nodes-sqlite3/node_modules/better-sqlite3/lib/database.js:65:9) at ExecuteContext.execute (/home/node/.n8n/nodes/node_modules/n8n-nodes-sqlite3/nodes/SqliteNode/SqliteNode.node.ts:243:15) at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1045:31) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1226:22) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1662:38 at processTicksAndRejections (node:internal/process/task_queues:105:5) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2274:11

We are on a self-hosted docker instance. We have already tried adding the following to our docker-compose.yml:

n8n:

volumes:

  - /home/\[username\]/AgentPrompts/WazuhAlerts:/WazuhAlerts

We then put /WazuhAlerts/wazuh_alerts.db as the database path in the node and same error. Ideas?

Not sure witch version of N8N you are using but in the last one accessing filesystem is limited by this configuration.

you should add something like

```
N8N_RESTRICT_FILE_ACCESS_TO=/WazuhAlerts
```