Updated drizzle-kit -> Error: Cannot find module 'drizzle-orm/pg-core'

I updated drizzle from:
"drizzle-orm": "^0.29.1",
"drizzle-kit": "^0.20.6",
"drizzle-orm": "^0.29.1",
"drizzle-kit": "^0.20.6",
to
"drizzle-orm": "^0.28.5",
"drizzle-kit": "^0.19.3",
"drizzle-orm": "^0.28.5",
"drizzle-kit": "^0.19.3",
I updated my config to use the new defineConfig method and changed the connectionString to uri
export default defineConfig({
schema: "./src/server/db/schema.ts",
driver: "mysql2",
dbCredentials: {
uri: env.DATABASE_URL,
},
tablesFilter: ["bun-loconta_*"],
});
export default defineConfig({
schema: "./src/server/db/schema.ts",
driver: "mysql2",
dbCredentials: {
uri: env.DATABASE_URL,
},
tablesFilter: ["bun-loconta_*"],
});
but now I am getting this error when I try to run drizzle-kit: Error: Cannot find module 'drizzle-orm/pg-core' I dont use postgres, my driver is mysql2 using PlanetScale as DB provider. my package.json - I am using bun run incase it matters:
"scripts": {
"db:push": "dotenv drizzle-kit push:mysql",
"db:studio": "dotenv drizzle-kit studio",
},
"scripts": {
"db:push": "dotenv drizzle-kit push:mysql",
"db:studio": "dotenv drizzle-kit studio",
},
A
Angelelz151d ago
Maybe you imported the drizzle function from "pg-core" by mistake? I reproduction repo would be great to investigate
H
Hocus150d ago
hmm nope, if that were the case, shoudn't it also fail in the previous version?
H
Hocus150d ago
will only be able to do this end of the week. But if you are down, bootstrap a project with https://create.t3.gg/ and update to latest drizzle version.
Create T3 App
Create T3 App
The best way to start a full-stack, typesafe Next.js app.
A
Angelelz150d ago
You can try deleting your node_modules, lock file and installing everything again
H
Hocus150d ago
I ended up switching to postgres, which then has thrown a missing "pg" dependency error. I installed it as a dev dependency now even though the rest of the app works without it. I assume studio needs it anyways but doesnt have it bundled itself?
Want results from more Discord servers?
Add your server
More Posts
Increment without first selecting```sql UPDATE table_name SET column_name = column_name + 1 WHERE condition; ``` please any easy wayLibsql mapHranaErrorUsing Drizzle with Turso with the following schema and code and receiving a libsql error as shown. Help with deciding when to use indexes.I have the following schema: ```typescript // missing imports from drizzle to avoid discord characteDB operations don't execute when promise is not awaitedThe following snippet will not actually execute the SQL update: ```typescript function setEmailVerifTransaction rolling back without errorHello all, I'm trying to use Drizzle together with Supabase and SvelteKit to have transaction suppoQuestion about dynamic query buildingHello! I read this page here: https://orm.drizzle.team/docs/dynamic-query-building And I don't quitePrepare statement throws type error for enums. How to get type safety for prepared valuesthe status column in the schema is an enum like so: ```ts status: mysqlEnum("status", "PENDING", "Can I run the `migrate()` function exporting a raw SQL query in Drizzle ORM?I am building a Tauri app with a local SQLite database, and I have access via JavaScript. Here's an bun:sqlite FindFirst returns an object with all values undefinedRunning FindFirst gives me an object with the proper keys but all values are undefined. Running FindOn Failed Migration rollback doesn't happend on the databaseIf any migration file have multiple line of statement, and if 3rd line cause any error to failed theHelp with refactoring a (probably unnecessarily) huge querythe query is attached... too big for messages 🤣circular foreign keysI have separate files for each table: ``` export const productVariant = pgTable("product_variant", Postgres 'with' returns null with basic setup?Hi all. Trying to get my head around Drizzle's query API but I've hit a stumbling block. I've got a avoiding conflicts in mySQLHi im trying to avoid conflicts in my app by checking the 'lastModified' column on the database agai