Error with drizzle-kit push

node:internal/modules/cjs/loader:1251 throw err; ^ Error: Cannot find module 'drizzle-orm/casing' Require stack: - /home/anon/Documents/Dev/sm-tracking/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15) at Module._load (node:internal/modules/cjs/loader:1074:27) at TracingChannel.traceSync (node:diagnostics_channel:315:14) at wrapModuleLoad (node:internal/modules/cjs/loader:217:24) at Module.require (node:internal/modules/cjs/loader:1339:12) at require (node:internal/modules/helpers:135:16) at src/utils.ts (/home/anon/Documents/Dev/sm-tracking/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:6604:21) at __init (/home/anon/Documents/Dev/sm-tracking/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:10:56) at Object.<anonymous> (/home/anon/Documents/Dev/sm-tracking/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:83481:1) at Module._compile (node:internal/modules/cjs/loader:1546:14) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/anon/Documents/Dev/sm-tracking/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs' ] } Node.js v22.9.0
10 Replies
๐“ค๐“ท๐“ฒ๐“ฌ
When i run dirzzle-kit push appears this error I0m using drizzle-kit 0.25.0 and drizzle-orm 0.34.1
AlexDaniel
AlexDanielโ€ข2mo ago
Same error. First time I see it ๐Ÿค” @Unic alright, actually, the issue was on my side. I was installing dev dependencies (with drizzle-kit) without installing drizzle itself (which was in regular dependencies). After installing everything, it is now working. So just install drizzle itself!
Sloperrrr
Sloperrrrโ€ข2mo ago
Hi @AlexDaniel experiencing this too right now. Not sure what you mean by "without installing drizzle itself".
Sloperrrr
Sloperrrrโ€ข2mo ago
GitHub
[BUG]: Unable to run migrations using drizzle-kit 0.25.0 ยท Issue #3...
What version of drizzle-orm are you using? 0.33.0 What version of drizzle-kit are you using? 0.25.0 Describe the Bug pnpm --package=drizzle-kit --package=drizzle-orm --package=pg -c dlx 'drizzl...
AlexDaniel
AlexDanielโ€ข2mo ago
in my case I had package.json like this:
"dependencies": {
"drizzle-orm": "0.34.1",
โ€ฆ
},
"devDependencies": {
"drizzle-kit": "0.25.0",
โ€ฆ
}
"dependencies": {
"drizzle-orm": "0.34.1",
โ€ฆ
},
"devDependencies": {
"drizzle-kit": "0.25.0",
โ€ฆ
}
Then I did pnpm install --dev instead of pnpm install and ended up with kit and no drizzle itself
Sloperrrr
Sloperrrrโ€ข2mo ago
So installing both modules as dev dependencies? At the moment both the orm and kit are ordinary deps in my codebase
AlexDaniel
AlexDanielโ€ข2mo ago
my error did not look like yours though, @Sloperrrr, and it was more like the one in the OP
Sloperrrr
Sloperrrrโ€ข2mo ago
Likely because I'm using pnpm. Are you using npm? Ah i see you're using pnpm. the error itself looks like it's referring to the same problem though:/ Can confirm errors are the same: when using pnpx Error: Cannot find module 'drizzle-orm/casing' when using pnpm Package subpath './casing' is not defined by "exports"
Firee
Fireeโ€ข2mo ago
Any of you experienced this? TypeError: Cannot read properties of undefined (reading 'endsWith')
AlexDaniel
AlexDanielโ€ข2mo ago
@Firee sounds like it's unrelated to drizzle
Want results from more Discord servers?
Add your server