SQLite is not found (error when n8n starts)

>> n8n start
User settings loaded from: /home/guilherme/.n8n/config
Initializing n8n process
Error: There was an error initializing DB
    at Start.exitWithCrash (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/src/commands/BaseCommand.ts:159:23)
    at /home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/src/commands/BaseCommand.ts:71:39
    at Start.init (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/src/commands/BaseCommand.ts:70:3)
    ... 3 lines matching cause stack trace ...
    at run (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@oclif/core/lib/main.js:94:16)
    at /home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/bin/n8n:65:2 {
  [cause]: DriverPackageNotInstalledError: SQLite package has not been found installed. Try to install it: npm install sqlite3 --save
      at SqliteDriver.loadDependencies (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/src/driver/sqlite/SqliteDriver.ts:201:19)
      at new SqliteDriver (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/src/driver/sqlite/SqliteDriver.ts:44:14)
      at Function.create (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/src/driver/DriverFactory.ts:93:16)
      at DataSource.initialize (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/src/data-source/DataSource.ts:248:23)
      at Object.init (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/src/Db.ts:57:2)
      at Start.init (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/src/commands/BaseCommand.ts:70:3)
      at Start.init (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/src/commands/start.ts:195:3)
      at Start._run (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@oclif/core/lib/command.js:301:13)
      at Config.runCommand (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@oclif/core/lib/config/config.js:424:25)
      at run (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@oclif/core/lib/main.js:94:16)
} undefined
DriverPackageNotInstalledError: SQLite package has not been found installed. Try to install it: npm install sqlite3 --save
    at SqliteDriver.loadDependencies (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/src/driver/sqlite/SqliteDriver.ts:201:19)
    at new SqliteDriver (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/src/driver/sqlite/SqliteDriver.ts:44:14)
    at Function.create (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/src/driver/DriverFactory.ts:93:16)
    at DataSource.initialize (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/src/data-source/DataSource.ts:248:23)
    at Object.init (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/src/Db.ts:57:2)
    at Start.init (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/src/commands/BaseCommand.ts:70:3)
    at Start.init (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/src/commands/start.ts:195:3)
    at Start._run (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@oclif/core/lib/command.js:301:13)
    at Config.runCommand (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@oclif/core/lib/config/config.js:424:25)
    at run (/home/guilherme/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@oclif/core/lib/main.js:94:16) undefined

I already reinstalled n8n (npm install n8n -g) and sqlite3 (with the npm install sqlite3 --save), but it still not working. Any tips to solve this issue?

Hi @megarubber

Welcome to the community!

You do not need to install sqlite when using n8n, it creates it for you when installing n8n.
Not sure why it would be crashing though. Have you tried using Docker? this is a lot easier to get going.

1 Like

I installed SQLite just because every time I try to execute n8n start in my n8n starter folder, it returns that SQLite isn’t recognized by my n8n environment, so much so that it recommends (in error message) running this command: n8n install sqlite3 --save.

I tested with Docker, but I’d like now with Node to build some nodes following this docs.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.