babakfp
babakfp
Explore posts from servers
DTDrizzle Team
Created by babakfp on 2/11/2024 in #help
ERROR 500. SvelteKit + Drizzle + better-sqlite
Hi Deployed site: https://drizzle-test-test-test-hahaha.vercel.app Source code: https://github.com/babakfp/drizzle-test-test-test-hahaha ERROR MESSAGE:
SqliteError: unable to open database file
at new Database (/var/task/node_modules/better-sqlite3/lib/database.js:69:26)
at file:///var/task/.svelte-kit/output/server/entries/pages/_page.server.ts.js:4:16
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
at async Promise.all (index 1)
at async render_page (file:///var/task/.svelte-kit/output/server/index.js:2025:19)
at async resolve2 (file:///var/task/.svelte-kit/output/server/index.js:2839:24)
at async respond (file:///var/task/.svelte-kit/output/server/index.js:2730:22)
at async Server.default (file:///var/task/.svelte-kit/vercel-tmp/index.js:39:3)
at async Server.<anonymous> (/opt/node-bridge/bridge-server-D2QTJ22O.js:1:8930) {
code: 'SQLITE_CANTOPEN'
}
SqliteError: unable to open database file
at new Database (/var/task/node_modules/better-sqlite3/lib/database.js:69:26)
at file:///var/task/.svelte-kit/output/server/entries/pages/_page.server.ts.js:4:16
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
at async Promise.all (index 1)
at async render_page (file:///var/task/.svelte-kit/output/server/index.js:2025:19)
at async resolve2 (file:///var/task/.svelte-kit/output/server/index.js:2839:24)
at async respond (file:///var/task/.svelte-kit/output/server/index.js:2730:22)
at async Server.default (file:///var/task/.svelte-kit/vercel-tmp/index.js:39:3)
at async Server.<anonymous> (/opt/node-bridge/bridge-server-D2QTJ22O.js:1:8930) {
code: 'SQLITE_CANTOPEN'
}
Do I need to do something to get it working? Works with no problem on local
5 replies
DTDrizzle Team
Created by babakfp on 2/7/2024 in #help
Are there any examples with Drizzle + SvelteKit + `better-sqlite3`?
Hi, I can't get drizzle working, error after error (lol). I'm looking for something bare minimum that works! I'm getting this error:
SqliteError: no such table: users
SqliteError: no such table: users
I ran this but didn't fix it:
pnpm drizzle-kit generate
pnpm drizzle-kit generate
Thanks.
7 replies
DTDrizzle Team
Created by babakfp on 1/22/2024 in #help
What should I put inside `dbCredentials`? I'm using a local `.db` file with `better-sqlite3`
import type { Config } from "drizzle-kit"

export default {
schema: "./schema/*",
out: "./drizzle",
driver: "better-sqlite",
dbCredentials: {

},
} satisfies Config
import type { Config } from "drizzle-kit"

export default {
schema: "./schema/*",
out: "./drizzle",
driver: "better-sqlite",
dbCredentials: {

},
} satisfies Config
8 replies