Drizzle Studio not working with bun
I had a basic project running with pnpm, then switched to bun and removed the dotenv package and its imports in
/drizzle.config.ts
.
Now when I run bun drizzle-kit studio
I get this error:
/drizzle/drizzle.config.json file does not exist
Previously it didn't look in the /drizzle folder for the config file, and automatically detected that my config was in root and ended with a .ts extension.
If I run bun drizzle-kit studio --config ../drizzle.config.ts
it picks up the config file, but I get this error:
Here's my drizzle.config.ts
:
The one change I've made to my config file is that I removed the dotenv package that I previously used (when still using pnpm/node). It seems that drizzle studio isn't picking up the env variables via bun.
Is this intentional behaviour? How should I resolve this? Thanks!1 Reply
I was able to get this working after installing dotenv again and calling dotenv.config() in my
drizzle.config.ts
file. Any way to do without dotenv?