[GH-ISSUE #6870] Cannot update better-auth to use with prisma 7 #27981

Closed
opened 2026-04-17 19:18:05 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @TvrtkoM on GitHub (Dec 18, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/6870

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

I cannot update better-auth when using npm i better-auth@latest

Current vs. Expected behavior

I'm getting this error:

npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: sample-den@0.1.0
npm error Found: prisma@7.2.0
npm error node_modules/prisma
npm error   dev prisma@"^7.1.0" from the root project
npm error   peerOptional prisma@"*" from @prisma/client@7.2.0
npm error   node_modules/@prisma/client
npm error     @prisma/client@"^7.1.0" from the root project
npm error     peerOptional @prisma/client@"*" from drizzle-orm@0.41.0
npm error     node_modules/drizzle-orm
npm error       peerOptional drizzle-orm@"^0.41.0" from better-auth@1.4.7
npm error       node_modules/better-auth
npm error         better-auth@"1.4.7" from the root project
npm error
npm error Could not resolve dependency:
npm error peerOptional prisma@"^5.22.0" from better-auth@1.4.7
npm error node_modules/better-auth
npm error   better-auth@"1.4.7" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

It seems better-auth expects different prisma version

What version of Better Auth are you using?

1.4.5

System info

`npx @better-auth/cli info --json` outputs nothing

Which area(s) are affected? (Select all that apply)

Package

Auth config (if applicable)

export const auth = betterAuth({
  database: prismaAdapter(prisma, {
    provider: 'postgresql',
  }),
  emailAndPassword: {
    enabled: true
  },
  socialProviders: {
    google: {
      prompt: 'select_account',
      clientId: process.env.GOOGLE_CLIENT_ID!,
      clientSecret: process.env.GOOGLE_CLIENT_SECRET!
    }
  },
  plugins: [anonymous()],
  experimental: {
    joins: true
  }
})

Additional context

No response

Originally created by @TvrtkoM on GitHub (Dec 18, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/6870 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce I cannot update better-auth when using `npm i better-auth@latest` ### Current vs. Expected behavior I'm getting this error: ``` npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: sample-den@0.1.0 npm error Found: prisma@7.2.0 npm error node_modules/prisma npm error dev prisma@"^7.1.0" from the root project npm error peerOptional prisma@"*" from @prisma/client@7.2.0 npm error node_modules/@prisma/client npm error @prisma/client@"^7.1.0" from the root project npm error peerOptional @prisma/client@"*" from drizzle-orm@0.41.0 npm error node_modules/drizzle-orm npm error peerOptional drizzle-orm@"^0.41.0" from better-auth@1.4.7 npm error node_modules/better-auth npm error better-auth@"1.4.7" from the root project npm error npm error Could not resolve dependency: npm error peerOptional prisma@"^5.22.0" from better-auth@1.4.7 npm error node_modules/better-auth npm error better-auth@"1.4.7" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. ``` It seems better-auth expects different prisma version ### What version of Better Auth are you using? 1.4.5 ### System info ```bash `npx @better-auth/cli info --json` outputs nothing ``` ### Which area(s) are affected? (Select all that apply) Package ### Auth config (if applicable) ```typescript export const auth = betterAuth({ database: prismaAdapter(prisma, { provider: 'postgresql', }), emailAndPassword: { enabled: true }, socialProviders: { google: { prompt: 'select_account', clientId: process.env.GOOGLE_CLIENT_ID!, clientSecret: process.env.GOOGLE_CLIENT_SECRET! } }, plugins: [anonymous()], experimental: { joins: true } }) ``` ### Additional context _No response_
GiteaMirror added the locked label 2026-04-17 19:18:05 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Dec 18, 2025):

It looks like the dependency conflict is coming from Better Auth expecting Prisma version ^5.22.0 while your project is using Prisma 7.2.0. This mismatch is causing npm to fail during dependency resolution. As a workaround, you could try installing with --legacy-peer-deps (or --force), but be aware this might lead to unexpected behavior if there are breaking changes between the Prisma versions. Alternatively, you might consider downgrading Prisma to a compatible version until Better Auth releases official support for Prisma 7. Are you comfortable trying one of these approaches, or would you like to tag @bekacru and @ping__ to discuss an updated support path? Tag @better-auth-agent if you would like an answer from the Agent.

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

<!-- gh-comment-id:3672577844 --> @better-auth-agent[bot] commented on GitHub (Dec 18, 2025): It looks like the dependency conflict is coming from Better Auth expecting Prisma version ^5.22.0 while your project is using Prisma 7.2.0. This mismatch is causing npm to fail during dependency resolution. As a workaround, you could try installing with --legacy-peer-deps (or --force), but be aware this might lead to unexpected behavior if there are breaking changes between the Prisma versions. Alternatively, you might consider downgrading Prisma to a compatible version until Better Auth releases official support for Prisma 7. Are you comfortable trying one of these approaches, or would you like to tag @bekacru and @ping__ to discuss an updated support path? Tag @better-auth-agent if you would like an answer from the Agent. _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) • [Discord](https://discord.gg/fG2XXEuQX3) • [GitHub](https://github.com/Skyvern-AI/Skyvern) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/fG2XXEuQX3) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/Skyvern-AI/Skyvern)
Author
Owner

@Bekacru commented on GitHub (Dec 19, 2025):

try v1.4.8-beta.1

<!-- gh-comment-id:3673585062 --> @Bekacru commented on GitHub (Dec 19, 2025): try v1.4.8-beta.1
Author
Owner

@himself65 commented on GitHub (Dec 19, 2025):

Fixed in 00ede9037a

<!-- gh-comment-id:3673605409 --> @himself65 commented on GitHub (Dec 19, 2025): Fixed in https://github.com/better-auth/better-auth/commit/00ede9037a4bce5f48f9adc0bc01d6e34056af3c
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#27981