© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
1 reply
Budi

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
/drizzle.config.ts
.

Now when I run
bun drizzle-kit studio
bun drizzle-kit studio
I get this error:

/drizzle/drizzle.config.json file does not exist
/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
bun drizzle-kit studio --config ../drizzle.config.ts
it picks up the config file, but I get this error:

 Invalid input  "url" is a required option for driver "turso". You can read more about drizzle.config: https://orm.drizzle.team/kit-docs/config-reference
 Invalid input  "authToken" is a required option for driver "turso". You can read more about drizzle.config: https://orm.drizzle.team/kit-docs/config-reference
error: "drizzle-kit" exited with code 1
 Invalid input  "url" is a required option for driver "turso". You can read more about drizzle.config: https://orm.drizzle.team/kit-docs/config-reference
 Invalid input  "authToken" is a required option for driver "turso". You can read more about drizzle.config: https://orm.drizzle.team/kit-docs/config-reference
error: "drizzle-kit" exited with code 1


Here's my
drizzle.config.ts
drizzle.config.ts
:

import type { Config } from "drizzle-kit"

export default {
    schema: "./drizzle/schema.ts",
    out: "./drizzle/migrations",
    driver: "turso",
    dbCredentials: {
        url: process.env.LOCAL_DATABASE_URL as string,
        authToken: process.env.LOCAL_DATABASE_AUTH_TOKEN as string
    },
    // Print all statements
    verbose: true,
    // Always ask for confirmation, even they aren't breaking
    strict: true,
    // Execute every migration statement individually
    breakpoints: true
} satisfies Config
import type { Config } from "drizzle-kit"

export default {
    schema: "./drizzle/schema.ts",
    out: "./drizzle/migrations",
    driver: "turso",
    dbCredentials: {
        url: process.env.LOCAL_DATABASE_URL as string,
        authToken: process.env.LOCAL_DATABASE_AUTH_TOKEN as string
    },
    // Print all statements
    verbose: true,
    // Always ask for confirmation, even they aren't breaking
    strict: true,
    // Execute every migration statement individually
    breakpoints: true
} satisfies Config


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!
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Drizzle studio not working
Drizzle TeamDTDrizzle Team / help
7mo ago
drizzle studio not working neon
Drizzle TeamDTDrizzle Team / help
2y ago
Bun with drizzle
Drizzle TeamDTDrizzle Team / help
3y ago
Drizzle Studio not working with Turborepo Monorepo + AlloyDB
Drizzle TeamDTDrizzle Team / help
4mo ago