-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Report hasn't been filed before.
- I have verified that the bug I'm about to report hasn't been filed before.
What version of drizzle-orm are you using?
0.44.6
What version of drizzle-kit are you using?
0.31.5
Other packages
drizzle-zod@0.8.3
Describe the Bug
Bug Description
When running pnpm dlx drizzle-kit generate, the command fails with the error "Please install latest version of drizzle-orm" even though the latest versions of both drizzle-orm and drizzle-kit are installed. The same command works perfectly when using npx drizzle-kit generate.
Environment
Package Manager: pnpm v10.4.1
drizzle-orm: 0.44.6 (latest)
drizzle-kit: 0.31.5 (latest)
Node.js: v22.20.0
OS: macOS (darwin)
Steps to Reproduce
Install latest versions of drizzle-orm and drizzle-kit with pnpm
Create a valid drizzle.config.ts file
Run pnpm dlx drizzle-kit generate
Observe the error message
Expected Behavior
The command should generate migrations successfully, just like it does with npx.
Actual Behavior
No config path provided, using default 'drizzle.config.ts'
Reading config file '/path/to/drizzle.config.ts'
Please install latest version of drizzle-orm
Workaround
Using npx drizzle-kit generate instead of pnpm dlx drizzle-kit generate works perfectly and generates the expected migration files.
Additional Context
pnpm list drizzle-orm drizzle-kit confirms both packages are at their latest versions
The drizzle.config.ts file is valid (works with npx)
This appears to be a compatibility issue between pnpm's dlx command and drizzle-kit's version detection logic
Configuration
// drizzle.config.ts
import "dotenv/config";
import { defineConfig } from "drizzle-kit";
export default defineConfig({
out: "./drizzle",
schema: "./src/auth-db/schema.ts",
dialect: "postgresql",
dbCredentials: {
url: process.env.AUTH_DATABASE_URL as string,
},
});
This issue affects developer experience when using pnpm as the primary package manager, forcing users to switch to npx for drizzle-kit commands.