Next.js Discord

Discord Forum

Vercel and Prisma Auth error

Answered
Eurasian Wryneck posted this in #help-forum
Open in Discord
Eurasian WryneckOP
Story time: I'm new to web app devolpment, trying to make a quick buck, don't get me wrong I want to do this for fun but i need cash. I've looked up a few vids and started making a web app on vercel. I tried adding my Prisma API key to the app and jazz. but i didnt do it right.

Error Code
Registration error: Error [PrismaClientInitializationError]: 
Invalid `prisma.user.findUnique()` invocation:


error: Error validating datasource `db`: the URL must start with the protocol `postgresql://` or `postgres://`.
  -->  schema.prisma:10
   | 
 9 |   provider = "postgresql"
10 |   url      = env("DATABASE_URL")
   | 

Validation Error Count: 1
    at <unknown> (-->  schema.prisma:10)
    at async c (.next/server/app/api/auth/register/route.js:1:751) {
  clientVersion: '6.6.0',
  errorCode: undefined,
  retryable: undefined
}

So now I ask, Where do I look to fix this and how do I do that? Is it at this location? next/server/app/api/auth/register/route.js

Also just in case where else can I look for help?
Answered by Eurasian Wryneck
I asked an AI for help nd it suggested this
View full answer

6 Replies

Eurasian WryneckOP
Idk if I gave enough details, I'm trying to set up a landing page for an AI web app. When you try to create an account thos log goes off and says there is an error on the website.
Eurasian WryneckOP
Ok I'm double checking, I have the DatabaseURL in
I updated it just in case
Eurasian WryneckOP
I asked an AI for help nd it suggested this
Answer
Eurasian WryneckOP
Ok so it seems I was using it wrong, I thought it was a database to replace neon, nope