PrismaP
Prisma9mo ago
4 replies
gkh

With PrismaORM 6.6 "DATABASE_URL" Cannot Be Found

I'm using SvelteKit. I've updated the schema to use the new ESM client build, but unless I directly export DATABASE_URL prior to running the image or even the local build, it runs into errors:
error: Environment variable not found: DATABASE_URL.
  -->  schema.prisma:9
   | 
 8 |   provider = "mysql"
 9 |   url      = env("DATABASE_URL")
   | 


generator client {
  provider = "prisma-client"
  output   = "../generated/prisma"
  moduleFormat = "esm"
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}


I've tried everything can can't figure out what I am missing.
Was this page helpful?