Skip to content

Bug: Error or bug using Prisma with DriverAdapter with PostgreSQL database Neon #23903

@EddyDevv

Description

@EddyDevv

Bug description

I'm using NextJS and NextAuth in its v5 beta version, when I use Prisma with Neon as a postgresql database, and using the adapters, to remove the Edge Functions error, I get that, and it is a basic code, what can be the solution, or is it a bug?

Error

image

Code

image

How to reproduce

The error or bug occurs when it is already running, it appears for a few moments or several logs and then does not appear.

Expected behavior

No response

Prisma information

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["driverAdapters"]
}

model User {
  id            String    @id @default(cuid())
  name          String?
  email         String    @unique
  role          UserRole  @default(USER)
  emailVerified DateTime?
  image         String?
  accounts      Account[]
  sessions      Session[]

  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

model Account {
  userId            String
  type              String
  provider          String
  providerAccountId String
  refresh_token     String?
  access_token      String?
  expires_at        Int?
  token_type        String?
  scope             String?
  id_token          String?
  session_state     String?

  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt

  user User @relation(fields: [userId], references: [id], onDelete: Cascade)

  @@id([provider, providerAccountId])
}

model Session {
  sessionToken String   @unique
  userId       String
  expires      DateTime
  user         User     @relation(fields: [userId], references: [id], onDelete: Cascade)

  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

model VerificationToken {
  identifier String
  token      String
  expires    DateTime

  @@id([identifier, token])
}

enum UserRole {
  USER
  ADMIN
}

Environment & setup

  • OS: Windows 11
  • Database: PostgreSQL
  • Node.js version: 20.12.2

Prisma Version

Prisma Version:  5.12.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions