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
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!
Hi @AlexDaniel experiencing this too right now. Not sure what you mean by "without installing drizzle itself".
Seems the issue was closed
https://github.com/drizzle-team/drizzle-orm/issues/3057
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...
in my case I had package.json like this:
Then I did
pnpm install --dev
instead of pnpm install
and ended up with kit and no drizzle itselfSo installing both modules as dev dependencies? At the moment both the orm and kit are ordinary deps in my codebase
my error did not look like yours though, @Sloperrrr, and it was more like the one in the OP
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"
Any of you experienced this?
TypeError: Cannot read properties of undefined (reading 'endsWith')
@Firee sounds like it's unrelated to drizzle