drizzle-kit picks wrong version in monorepo (pnpm)

Hello I have a monorepo with pnpm where I have two apps. One nextjs app and one Payload CMS app. Payload lags behind on drizzle-orm version but I want to update it for my nextjs app. I have installed different version in each project, but running drizzle-kit generate in the nextjs app complains about a too old drizzle-orm version (the one from the payload app) How can I resolve this? Can I force drizzle-kit to pick a specific version?
Solution:
I had to use node-linker=hoisted in .npmrc
Jump to solution
2 Replies
benjick
benjickOP2mo ago
drizzle-kit: v0.22.0
drizzle-orm: v0.29.3

This version of drizzle-kit requires newer version of drizzle-orm
drizzle-kit: v0.22.0
drizzle-orm: v0.29.3

This version of drizzle-kit requires newer version of drizzle-orm
cat package.json | grep drizzle
"drizzle-kit": "^0.22.0",
"drizzle-orm": "0.31.4",
"drizzle-zod": "^0.5.1",
cat package.json | grep drizzle
"drizzle-kit": "^0.22.0",
"drizzle-orm": "0.31.4",
"drizzle-zod": "^0.5.1",
bump
Solution
benjick
benjick2mo ago
I had to use node-linker=hoisted in .npmrc
Want results from more Discord servers?
Add your server