DATABASE_URL error
ct009
HOBBYOP

7 months ago

Hi All,

I've build and corgi my database and unable to connect to it using DATABASE_URL from my platform also within railway. I've tried many options.. What am I missing here

Thank You

Error: Prisma schema validation - (get-config wasm)

Error code: P1012

error: Environment variable not found: DATABASE_URL.

--> prisma/schema.prisma:14

|

13 | provider = "postgresql"

14 | url = env("DATABASE_URL")

|

Validation Error Count: 1

[Context: getConfig]

Prisma CLI Version : 6.12.0

level:"info"

source:"buildkit"

stream:2

timestamp:"2025-07-18T08:14:32.588171431Z"

type:"log"

vertex:"sha256:b713d8147ba2f6bda67b180bea905fb4a0e5236eb89ad65b28e56030a86f8984"

$10 Bounty

2 Replies

Railway
BOT

7 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


idiegea21
HOBBY

7 months ago

Heyyy, Make sure your DATABASE_URL environment variable is correctly set in Railway’s project settings(no quotes around the URL). If you’re getting the error during build, try using a public database URL (DATABASE_PUBLIC_URL) in your Prisma schema instead. Then run npx prisma generate and redeploy.


Loading...