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

Ssmoke5/19/2023
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/drizzle-kit@0.17.6/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/drizzle-kit@0.17.6/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"
}
}
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.
ASAndrii Sherman5/19/2023
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
Ssmoke5/19/2023
Ohh yes that does the trick! Ah thank you so much, I appreciate it

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
Conditional logic within template strings not supported on raw MySQL queryI am trying to execute raw SQL query with some conditional logic but it always fails. It's working fexecuting an `update` statement does not use `.onUpdateNow()` defined in schemaHello everyone 🙂 I have the following schema for my `USERS` table: ```ts export const users = mysqHelp with raw queryThe following query is all raw. Is there a way to make SQL raw only the part of the `where` clause? Create GIN index in PostgresI need to create this index in postgres: ```sql CREATE INDEX users_name_gin_trgm_idx ON users USINGHow to plus 1 to the current value of a column when updateHow to plus 1 to the current value of a column when updating a recordOrdering by a string column but coercing it to a number for orderingI have a column that mostly contains numbers with only a very few exceptions and want to apply ordertype union on entire rowi can think of workarounds for this but figured i'd ask if i have a table that's like [id, type, daProper query results inferencePosting my GitHub discussion here for more visibility: https://github.com/drizzle-team/drizzle-orm/dDrizzle with Next 13.4.2 & Vercel Postgres TimeoutHi all. I'm trying out NextJS server actions and Drizzle for the first time. I have it hooked up tI think I don't really understand migrations local sqlite.It's a local sqlite db (`DB_URL=file:dev.db`) in a nextjs & trpc setup. I'm trying drizzle for the fConnecting to Vercel PostgresI'm trying to connect to Vercel Postgres like this: ```ts import { drizzle } from "drizzle-orm/verceinsertID not returned correctly when using custom UUID```export const users = mysqlTable("users", { id: varchar("id", { length: 36 }) .primaryKey() weird ilike postgres behaviorhi, I have a very weird issue when trying to filter using ilike in postgres, both my local instance Cannot make a .all() query on an empty table (Bun SQLITE)I am new to SQLITE but i'm unable to make a .all() query on an empty table in a Bun with Drizzle proSelf referencing nullable ID field not assigneable in a `eq` statementI am not sure if I encountered another edge case but basically I have a self-referencing table whereCustom `Select` object returns type `any`Databases like Planetscale do not support FK constraints. As I understand I can manipulate the retur