Chrissi
Chrissi
DTDrizzle Team
Created by Chrissi on 10/5/2023 in #help
drizzle-kit bindings error with bun using local sqlite file
When I use my local sqlite file instead of my Turso DB, I get an error running bunx drizzle-kit push:sqlite The command works fine when using Turso. I use Bun version 1.0.2 This is the error output (upper half):
$ bunx drizzle-kit push:sqlite
No config path provided, using default path
Reading config file '/Users/chrissi/Desktop/repos/Stargazer/moonorepo/packages/db_orm/drizzle.config.ts'
drizzle-kit: v0.19.13
drizzle-orm: v0.28.6

/Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/bindings/bindings.js:126
err = new Error(
^

Error: Could not locate the bindings file. Tried:
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/build/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/build/Release/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/Debug/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/out/Release/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/Release/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/build/default/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/compiled/18.17.1/darwin/arm64/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/addon-

...
$ bunx drizzle-kit push:sqlite
No config path provided, using default path
Reading config file '/Users/chrissi/Desktop/repos/Stargazer/moonorepo/packages/db_orm/drizzle.config.ts'
drizzle-kit: v0.19.13
drizzle-orm: v0.28.6

/Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/bindings/bindings.js:126
err = new Error(
^

Error: Could not locate the bindings file. Tried:
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/build/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/build/Release/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/Debug/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/out/Release/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/Release/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/build/default/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/compiled/18.17.1/darwin/arm64/better_sqlite3.node
→ /Users/chrissi/Desktop/repos/Stargazer/moonorepo/node_modules/better-sqlite3/addon-

...
5 replies
DTDrizzle Team
Created by Chrissi on 9/18/2023 in #help
Enum type gets lost
Setup: I have a server-side db schema definition which I push with bunx drizzle-kit push:sqlite and pull on the website with bunx drizzle-kit introspect:sqlite in my schema definition I have the following table
export const vaults = sqliteTable("vaults", {
name: text("name").primaryKey().notNull(),
icon: text("icon").notNull(),
label: text("label").notNull(),
risk: text("risk", { enum: ["high", "medium", "low"] }).notNull(),
});
export const vaults = sqliteTable("vaults", {
name: text("name").primaryKey().notNull(),
icon: text("icon").notNull(),
label: text("label").notNull(),
risk: text("risk", { enum: ["high", "medium", "low"] }).notNull(),
});
but on the website, the pulled schema looks like this:
export const vaults = sqliteTable("vaults", {
name: text("name").primaryKey().notNull(),
icon: text("icon").notNull(),
label: text("label").notNull(),
risk: text("risk").notNull(),
});
export const vaults = sqliteTable("vaults", {
name: text("name").primaryKey().notNull(),
icon: text("icon").notNull(),
label: text("label").notNull(),
risk: text("risk").notNull(),
});
where the enum type got lost. Should I use another command to push and pull, or how can I fix this issue?
1 replies