question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsupported driver used: Client_BetterSQLite3

See original GitHub issue

Environment

Knex version: 1.0.1 Database + version: better-sqlite3, ^7.5.0, OS: ubuntu 20.04

Bug

  1. I can’t start a connection with the better-sqlite3.

  2. Error message

/home/ozzy/Desktop/my-api/node_modules/knex-schema-inspector/dist/index.js:26
            throw Error('Unsupported driver used: ' + knex.client.constructor.name);
                  ^

Error: Unsupported driver used: Client_BetterSQLite3
  1. Example
const knex = require('knex')({
  client: 'better-sqlite3',
  connection: {
    filename: "./mydb.sqlite"
  }
});

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
OlivierCavadenticommented, Mar 1, 2022
1reaction
rijkvanzantencommented, Jan 22, 2022

@kibertoad I don’t think we’re doing anything that’s specific to node-sqlite in there, so adding support might be as easy as extending:

https://github.com/knex/knex-schema-inspector/blob/b0af557df44a77abdbda7137253b512b79b5cacb/lib/index.ts#L17-L19

to

    case 'Client_SQLite3':
    case 'Client_BetterSQLite3':
      constructor = require('./dialects/sqlite').default;
      break;
Read more comments on GitHub >

github_iconTop Results From Across the Web

better-sqlite3 - npm
The fastest and simplest library for SQLite3 in Node.js. Full transaction support; High performance, efficiency, and safety; Easy-to-use ...
Read more >
Error installing sqlite3 in node.js - Stack Overflow
Failed at the sqlite3@3.1.8 install script 'node-pre-gyp install --fallback-to-build'. npm ERR! This is most likely a problem with the sqlite3 ...
Read more >
Unsupported driver [file]. - Laracasts
I am facing the issue of the unsupported driver while hitting my API I have the following configurations in my config/database.php. Copy Code...
Read more >
sqlite3 — DB-API 2.0 interface for SQLite databases — Python ...
SQLite is a C library that provides a lightweight disk-based database that doesn't require a separate server process and allows accessing the database...
Read more >
SQLite on Heroku
PostgreSQL database can be used by any language and framework, this section covers how to connect to it through the Ruby on Rails...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found