nextauthjs / next-auth

Authentication for the Web.
https://authjs.dev
ISC License
25.11k stars 3.56k forks source link

auth/prisma-adapter@2.7.4 incompatible to v2.7.2 - breaks nextjs apps #12325

Open jelmd opened 3 days ago

jelmd commented 3 days ago

Adapter type

@auth/prisma-adapter

Environment

  System:
    OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz
    Memory: 52.84 GB / 62.37 GB
    Container: Yes
    Shell: 6.21.00 - /usr/bin/tcsh
  Binaries:
    Node: 20.5.1 - /bin/node
    npm: 9.8.0 - /bin/npm
    Watchman: 4.9.0 - /bin/watchman
  Browsers:
    Chrome: 131.0.6778.85
  npmPackages:
    @auth/prisma-adapter: ^2.7.4 => 2.7.4 
    next: ^15.0.3 => 15.0.3 
    next-auth: ^5.0.0-beta.25 => 5.0.0-beta.25 
    react: ^19.0.0-rc.1 => 19.0.0-rc-512b09b2-20240718 
  System:
    OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz
    Memory: 52.84 GB / 62.37 GB
    Container: Yes
    Shell: 6.21.00 - /usr/bin/tcsh
  Binaries:
    Node: 20.5.1 - /bin/node
    npm: 9.8.0 - /bin/npm
    Watchman: 4.9.0 - /bin/watchman
  Browsers:
    Chrome: 131.0.6778.85
  npmPackages:
    @auth/prisma-adapter: ^2.7.4 => 2.7.4 
    next: ^15.0.3 => 15.0.3 
    next-auth: ^5.0.0-beta.25 => 5.0.0-beta.25 
    react: ^19.0.0-rc.1 => 19.0.0-rc-512b09b2-20240718 

Reproduction URL

https://github.com/jelmd/nextjs-bugs/tree/02_auth/01_auth

Describe the issue

Nextjs apps using @auth/prisma-adapter@2.7.2 cannot be build with the latest version anymore because of incompatible change (in v2.7.4?).

How to reproduce

git clone git@github.com:jelmd/nextjs-bugs.git
cd nextjs-bugs/01_auth
# follow README.md to setup related environment and run
npm run build
# fails. To fix install v2.7.2 and try again:
npm install --legacy-peer-deps @auth/prisma-adapter@2.7.2
npm run build

Expected behavior

Building the app should succeed.

jelmd commented 3 days ago

Forgot: before running build just do a git co 02_auth.