Fresh install results in drizzle error on "npm run db:push"

Package subpath './relations' is not defined by "exports" in /home/wsl-tom/git/t3test/node_modules/drizzle-orm/package.json
No description
Solution:
You know what, rm-rf'ing node_modules and then bun install as you suggested seems to have done the job. Not sure why the default NPM install failed across 2 projects - but thanks!...
Jump to solution
7 Replies
Yoers
Yoers11mo ago
Anyone seen this? Seems drizzle is missing an export perhaps Command works fine on prisma for me - shame though I wanted to try drizzle!
Josh
Josh11mo ago
iirc I had this when I had a version mismatch in my mono repo try deleting and reinstalling your node modules, and if you're in a mono repo make sure your drizzle deps are the exact same also make sure you have the right drivers installed for your db for pscale for instance you'll need the mysql2 package
Yoers
Yoers11mo ago
So I did a fresh install via npm create t3-app@latest multiple times with different names, same error each time That would rule out either the monorepo, or node_modules issue right? and do things not initially run locally via sqlite, as is the case with Prisma?
Josh
Josh11mo ago
well, no. still try to manually re install your node modules and use something like pnpm
Yoers
Yoers11mo ago
What do you mean, each fresh project has their own fresh node_modules no, or you're worried the global cache is corrupt?
Solution
Yoers
Yoers11mo ago
You know what, rm-rf'ing node_modules and then bun install as you suggested seems to have done the job. Not sure why the default NPM install failed across 2 projects - but thanks!
miklos
miklos11mo ago
Upgrading drizzle-orm to latest fixed this for me (v0.29.2). I'm using bun.
Want results from more Discord servers?
Add your server