Connection url is empty
Author: mmikhanCreated Mar 22, 2026Updated May 11, 2026
Labelsbug
Describe the bug
Running bun run migrate command in a fresh project shows the following error even though DATABASE_URL is set to packages/database/.env as expected as mentioned in the docs.
❯ bun run migrate
$ cd packages/database && bunx prisma format && bunx prisma generate && bunx prisma migrate dev
Loaded Prisma config from prisma.config.ts.
Prisma schema loaded from prisma/schema.prisma.
Formatted prisma/schema.prisma in 9ms
Loaded Prisma config from prisma.config.ts.
Prisma schema loaded from prisma/schema.prisma.
✔ Generated Prisma Client (7.4.2) to ./generated in 24ms
Loaded Prisma config from prisma.config.ts.
Prisma schema loaded from prisma/schema.prisma.
Datasource "db": PostgreSQL database
Error: Connection url is empty. See https://pris.ly/d/config-url
error: script "migrate" exited with code 1next-forge version I am using version 6.0.2
To Reproduce Steps to reproduce the behavior:
- Init a fresh project
bun x next-forge@latest init - Setup the
DATABASE_URLinpackages/database/.env - Run
bun run migratecommand
Expected behavior Migration runs successfully
Screenshots N/A
Desktop (please complete the following information):
- OS: MacOS
Source: vercel/next-forge