> cat test.js
import { drizzle } from 'drizzle-orm/better-sqlite3';
import Database from 'better-sqlite3';
const sqlite = new Database('sqlite.db');
const db = drizzle({ client: sqlite });
const result = await db.execute('select 1');
> node test.js
file:///private/tmp/test/test.js:7
const result = await db.execute('select 1');
^
TypeError: db.execute is not a function
at file:///private/tmp/test/test.js:7:25
at ModuleJob.run (node:internal/modules/esm/module_job:377:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:691:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)
Node.js v24.11.0
{
"dependencies": {
"better-sqlite3": "^12.4.6",
"drizzle-orm": "^0.44.7"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.13",
"drizzle-kit": "^0.31.7"
}
}