question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Prisma adapter with next-auth on a mysql database doesnt work

See original GitHub issue
Please create an issue at https://github.com/prisma/prisma/issues/new
    at cb (/Users/aniamritapc/Desktop/with-tailwindcss-app/node_modules/@prisma/client/runtime/index.js:38697:17)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async getUserByAccount (/Users/aniamritapc/Desktop/with-tailwindcss-app/node_modules/@next-auth/prisma-adapter/dist/index.js:11:29) {
  name: 'GetUserByAccountError',
  code: undefined


These are all my dependencies


"dependencies": {
    "@heroicons/react": "^1.0.5",
    "@next-auth/prisma-adapter": "^1.0.1",
    "@prisma/client": "^3.8.1",
    "esm": "^3.2.25",
    "framer-motion": "^5.6.0",
    "next": "latest",
    "next-auth": "^4.1.2",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-hook-form": "^7.24.1",
    "react-hot-toast": "^2.2.0",
    "react-icons": "^4.3.1",
    "superjson": "^1.8.0"
  },

My next-auth login works perfectly on github/google if i comment out the adapter: PrismaAdapter(prisma), from […nextauth].js

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
terose73commented, Jan 29, 2022

Opened a new issue, originally thought it might be related to the misleading error message

https://github.com/prisma/prisma/issues/11487

1reaction
anirbanchowdhurycommented, Jan 22, 2022

Rerunning npm install @prisma/client npx prisma generate seems to solve it

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix NextAuth With Prisma for mysql specified key is too ...
I am willing to use NextAuth with Prisma Adaptor wiht Mysql (5.7.36) database, but i am getting the following error.
Read more >
Prisma - NextAuth.js
To use this Adapter, you need to install Prisma Client, Prisma CLI, ... that doesn't support the creation of new databases, like Heroku....
Read more >
Walkthrough of how I set up Next-Auth with Prisma Adapter ...
sorry for the bad mic quality. I had the wrong mic selected and I'm too lazy to re-record this.
Read more >
Error message reference - Prisma
For more information about how to work with exceptions and error codes, see Handling ... "The table {table} does not exist in the...
Read more >
next-auth - npm
Start using next-auth in your project by running `npm i next-auth`. ... NextAuth.js is a complete open source authentication solution for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found