drizzle-kit: Error: Cannot find module 'drizzle-orm/version'

Hi there, when I run the following command: pnpx drizzle-kit generate:pg, I get the following error and I am not sure why:
drizzle-kit: v0.17.6

node:internal/modules/cjs/loader:995
const err = new Error(message);
^

Error: Cannot find module 'drizzle-orm/version'
Require stack:
- /Users/user/Library/pnpm/store/v3/tmp/dlx-5856/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js
drizzle-kit: v0.17.6

node:internal/modules/cjs/loader:995
const err = new Error(message);
^

Error: Cannot find module 'drizzle-orm/version'
Require stack:
- /Users/user/Library/pnpm/store/v3/tmp/dlx-5856/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js
{
"devDependencies": {
"@types/node": "^18.15.5",
"@types/pg": "^8.6.6",
"drizzle-kit": "0.17.6",
"ts-node-dev": "^2.0.0",
"typescript": "^5.0.2"
},
"dependencies": {
"drizzle-orm": "^0.25.4",
"pg": "^8.11.0"
}
}
{
"devDependencies": {
"@types/node": "^18.15.5",
"@types/pg": "^8.6.6",
"drizzle-kit": "0.17.6",
"ts-node-dev": "^2.0.0",
"typescript": "^5.0.2"
},
"dependencies": {
"drizzle-orm": "^0.25.4",
"pg": "^8.11.0"
}
}
3 Replies
smoke
smokeOP2y ago
node -v: Node.js v18.11.0 Also tried to run it as a custom script: "generate": "pnpx drizzle-kit generate:pg" with pnpm generate, same issue unfortunately.
Andrii Sherman
It should be run in a scripts from package.json
{
"scripts": {
"generate": "drizzle-kit generate:pg"
}
}
{
"scripts": {
"generate": "drizzle-kit generate:pg"
}
}
pnpm run generate
pnpm run generate
Will update docs now without pnpx
smoke
smokeOP2y ago
Ohh yes that does the trick! Ah thank you so much, I appreciate it
Want results from more Discord servers?
Add your server