drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
24.68k stars 651 forks source link

[BUG]: Installing latest drizzle-kit and drizzle-orm results in version error #3578

Open Taira-U opened 6 days ago

Taira-U commented 6 days ago

Report hasn't been filed before.

What version of drizzle-orm are you using?

0.36.3

What version of drizzle-kit are you using?

0.28.1

Other packages

drizzle-zod@0.5.1, pg@8.13.1

Describe the Bug

I created a project with drizzle and postgresql according to the official documentation postgresql-new, and when I run npx drizzle-kit push, it prompts me to update drizzle-orm and exits with an error. However, when I update drizzle-orm to the latest version (drizzle-orm@0.36.3) available at the moment, I keep getting the same error message. The version of drizzle-orm corresponding to drizzle-kit@0.28.1 does not seem to be drizzle-orm@0.36.3, which is the latest at the moment. Can you tell me which version of drizzle-orm corresponds to drizzle-kit@0.28.1?

$ npx drizzle-kit push
No config path provided, using default 'drizzle.config.ts'
Reading config file '/XXX/drizzle.config.ts'
This version of drizzle-kit requires newer version of drizzle-orm
Please update drizzle-orm package to the latest version 👍
dalton-oliveira commented 2 days ago

I had the same error and I'm using yarn@4.5.1 as a package manager. I could workaround this by forcing a dependencies on .yarnrc.yml

packageExtensions:
  drizzle-kit@*:
    dependencies:
      drizzle-orm: "*"
      pg: "*"

Then I ran yarn drizzle-kit pull