I encountered an error while working on Next Authentication with the Google adapter. The specific error message is as follows:
✓ Compiled /api/auth/[...nextauth] in 371ms (70 modules)
(node:9269) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[next-auth][error][adapter_error_getUserByAccount]
https://next-auth.js.org/errors#adapter_error_getuserbyaccount
Invalid `p.account.findUnique()` invocation in...
Here is a snippet of my schema structure:
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id Int @id @unique @default(autoincrement())...
...
Despite searching online for possible solutions and updating my model, I have not been able to resolve the issue. My setup involves utilizing Next.js and Prisma for communication between the front end and database.
The configuration file used for this setup includes:
// import { PrismaAdapter } from '@next-auth/prisma-adapter';
// import { PrismaClient } from '@prisma/client';
// import NextAuth from "next-auth";...
import NextAuth from 'next-auth'
import { PrismaClient } from '@prisma/client'
...