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",
},
5 Replies
Angelelz
Angelelz12mo ago
Maybe you imported the drizzle function from "pg-core" by mistake? I reproduction repo would be great to investigate
Hocus
HocusOP12mo ago
hmm nope, if that were the case, shoudn't it also fail in the previous version?
Hocus
HocusOP12mo 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.
Angelelz
Angelelz12mo ago
You can try deleting your node_modules, lock file and installing everything again
Hocus
HocusOP12mo 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