Middleware error: PrismaClientKnownRequestError
On localhost it works all fine no error, nothing, but on vercel there is this issue "Middleware error: PrismaClientKnownRequestError:
Invalid
prisma.subdomain.findFirst()
invocation:
Error validating datasource db
: the URL must start with the protocol prisma://
" i dont know why, my env is
DATABASE_URL="prisma://accelerate.prisma-data.net/?api_key=..."
DIRECT_DATABASE_URL="postgres://avnadmin:...pg-236b6581-....k.aivencloud.com:14028/defaultdb?sslmode=require"
My prisma.ts is
and finally my schema.prisma
so i do not get what the issue is as i have followed all the docs and tried for hour's and it just doesn't seem to wanna work.
if anyone could help tat would be amazing4 Replies
?
Hi @fuzzbear
What happens when you change the import from
import { PrismaClient } from "@prisma/client/edge"
to
import { PrismaClient } from "@prisma/client
hey @RaphaelEtim thank's alot i have fixed it now, the issue was with my ENV on vercel.
Good to hear it's fixed now.