Replies: 1 comment 1 reply
-
@ivShoto it's trying to reach your DB where it would be in local testing, make sure on Vercel the env vars are set to target your production DB URL |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Hi All,
I'm pretty new to all of this. I deployed the t3 stack on vercel, and had auth working with discord next.js / postgres... the prisma schema build process always went fine, still does... so I assumed I was putting up a postgres db locally. This week my auth stopped working and I get this message in logs: t3 was doubting it ever worked with localhost but I swear I had this working? If the build with prisma is working, doesn't that mean there is a postgres server running somewhere on my vercel project? I assume if knew this location I could point my env variable to replace the local host with it? How would I find this? Please note, I didn't go through the vercel make a postgres db, I assume t3 stack uploaded this as part of the npm build.
prisma:error
Invalid
prisma.account.findUnique()
invocation:Can't reach database server at
localhost
:5432
Please make sure your database server is running at
localhost
:5432
.[next-auth][error][adapter_error_getUserByAccount]
https://next-auth.js.org/errors#adapter_error_getuserbyaccount
Invalid
prisma.account.findUnique()
invocation:Can't reach database server at
localhost
:5432
Please make sure your database server is running at
localhost
:5432
. {message: '\n' +
'Invalid
prisma.account.findUnique()
invocation:\n' +'\n' +
'\n' +
"Can't reach database server at
localhost
:5432
\n" +'\n' +
'Please make sure your database server is running at
localhost
:5432
.',stack: 'PrismaClientInitializationError: \n' +
'Invalid
prisma.account.findUnique()
invocation:\n' +'\n' +
'\n' +
"Can't reach database server at
localhost
:5432
\n" +'\n' +
'Please make sure your database server is running at
localhost
:5432
.\n' +' at _n.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:123:7154)\n' +
' at _n.handleAndLogRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:123:6188)\n' +
' at _n.request (/var/task/node_modules/@prisma/client/runtime/library.js:123:5896)\n' +
' at async l (/var/task/node_modules/@prisma/client/runtime/library.js:128:10871)\n' +
' at async getUserByAccount (file:///var/task/node_modules/@auth/prisma-adapter/index.js:222:29)',
name: 'PrismaClientInitializationError'
}
[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error
Invalid
prisma.account.findUnique()
invocation:Can't reach database server at
localhost
:5432
Please make sure your database server is running at
localhost
:5432
. PrismaClientInitializationError:Invalid
prisma.account.findUnique()
invocation:Can't reach database server at
localhost
:5432
Please make sure your database server is running at
localhost
:5432
.at _n.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:123:7154)
at _n.handleAndLogRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:123:6188)
at _n.request (/var/task/node_modules/@prisma/client/runtime/library.js:123:5896)
at async l (/var/task/node_modules/@prisma/client/runtime/library.js:128:10871)
at async getUserByAccount (file:///var/task/node_modules/@auth/prisma-adapter/index.js:222:29) {
name: 'GetUserByAccountError',
code: undefined
}
Example
No response
Steps to Reproduce
create a t3 app with postgress
get basic next auth with discord up and running
deploy to vercel
Beta Was this translation helpful? Give feedback.
All reactions