[GH-ISSUE #6925] better-auth@1.4.7 conflicts with drizzle-orm@0.45.x during npm install #10673

Closed
opened 2026-04-13 06:56:51 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @AbelGAlem on GitHub (Dec 21, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/6925

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Upgrade better-auth from 1.4.6 → 1.4.7 with drizzle-orm@0.45.1 installed
  2. Run npm install

Current vs. Expected behavior

Current behavior

npm install fails with an ERESOLVE peer dependency error.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: better-auth@1.4.7
npm ERR! Found: drizzle-orm@0.45.1
npm ERR! node_modules/drizzle-orm
npm ERR! drizzle-orm@"0.45.1" from server@0.1.0
npm ERR! packages/server
npm ERR! drizzle-orm@"0.45.1" from web@0.1.0
npm ERR! packages/web
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional drizzle-orm@"^0.41.0" from better-auth@1.4.7
npm ERR! packages/server/node_modules/better-auth
npm ERR! better-auth@"1.4.7" from server@0.1.0
npm ERR! packages/server
npm ERR!
npm ERR! Conflicting peer dependency: drizzle-orm@0.41.0
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Expcted behavior

npm install completes successfully.

What version of Better Auth are you using?

1.4.7

System info

None

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

Package

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
});

Additional context

No response

Originally created by @AbelGAlem on GitHub (Dec 21, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/6925 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Upgrade better-auth from 1.4.6 → 1.4.7 with drizzle-orm@0.45.1 installed 2. Run npm install ### Current vs. Expected behavior ### Current behavior `npm install` fails with an `ERESOLVE` peer dependency error. <code>npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: better-auth@1.4.7 npm ERR! Found: drizzle-orm@0.45.1 npm ERR! node_modules/drizzle-orm npm ERR! drizzle-orm@"0.45.1" from server@0.1.0 npm ERR! packages/server npm ERR! drizzle-orm@"0.45.1" from web@0.1.0 npm ERR! packages/web npm ERR! npm ERR! Could not resolve dependency: npm ERR! peerOptional drizzle-orm@"^0.41.0" from better-auth@1.4.7 npm ERR! packages/server/node_modules/better-auth npm ERR! better-auth@"1.4.7" from server@0.1.0 npm ERR! packages/server npm ERR! npm ERR! Conflicting peer dependency: drizzle-orm@0.41.0 npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. </code> ### Expcted behavior `npm install` completes successfully. ### What version of Better Auth are you using? 1.4.7 ### System info ```bash None ``` ### Which area(s) are affected? (Select all that apply) Package ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
GiteaMirror added the locked label 2026-04-13 06:56:51 -05:00
Author
Owner

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

The issue you're experiencing with the better-auth@1.4.7 package is indeed a known problem related to peer dependencies. Specifically, better-auth@1.4.7 has a conflicting peer dependency with drizzle-orm@0.45.1, as it requires drizzle-orm version ^0.41.0. This is leading to the ERESOLVE error during npm installation when trying to install better-auth@1.4.7 alongside drizzle-orm@0.45.1 [1], [2].

Steps to Resolve:

  1. Downgrade drizzle-orm: If possible, you can downgrade drizzle-orm to a compatible version (like 0.41.x).

  2. Use --force or --legacy-peer-deps: You can run the npm install command with either --force or --legacy-peer-deps to bypass the peer dependency conflict. However, be cautious, as this may lead to unexpected behavior in your application.

  3. Monitor for updates: Keep an eye on the Better Auth updates for potential resolutions regarding the compatibility with the latest versions of drizzle-orm.

Would you like more detailed instructions on how to apply one of these solutions?

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

DiagramDiscordGitHub

Diagram Join Star

<!-- gh-comment-id:3679609417 --> @better-auth-agent[bot] commented on GitHub (Dec 21, 2025): The issue you're experiencing with the `better-auth@1.4.7` package is indeed a known problem related to peer dependencies. Specifically, `better-auth@1.4.7` has a conflicting peer dependency with `drizzle-orm@0.45.1`, as it requires `drizzle-orm` version `^0.41.0`. This is leading to the `ERESOLVE` error during npm installation when trying to install `better-auth@1.4.7` alongside `drizzle-orm@0.45.1` [[1]](https://github.com/better-auth/better-auth/issues/6778), [[2]](https://github.com/better-auth/better-auth/issues/6765). ### Steps to Resolve: 1. **Downgrade drizzle-orm**: If possible, you can downgrade `drizzle-orm` to a compatible version (like `0.41.x`). 2. **Use --force or --legacy-peer-deps**: You can run the npm install command with either `--force` or `--legacy-peer-deps` to bypass the peer dependency conflict. However, be cautious, as this may lead to unexpected behavior in your application. 3. **Monitor for updates**: Keep an eye on the Better Auth updates for potential resolutions regarding the compatibility with the latest versions of `drizzle-orm`. Would you like more detailed instructions on how to apply one of these solutions? _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

@jslno commented on GitHub (Dec 22, 2025):

This should be fixed in lts

<!-- gh-comment-id:3680412276 --> @jslno commented on GitHub (Dec 22, 2025): This should be fixed in lts
Author
Owner

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

You can try v1.4.8-beta.1

<!-- gh-comment-id:3680526539 --> @himself65 commented on GitHub (Dec 22, 2025): You can try v1.4.8-beta.1
Author
Owner

@uncomplexity commented on GitHub (Dec 22, 2025):

This should be fixed in lts

how to do dat?

<!-- gh-comment-id:3680691411 --> @uncomplexity commented on GitHub (Dec 22, 2025): > This should be fixed in lts how to do dat?
Author
Owner

@jslno commented on GitHub (Dec 22, 2025):

npm install better-auth@1.4.8-beta.6

<!-- gh-comment-id:3681688344 --> @jslno commented on GitHub (Dec 22, 2025): `npm install better-auth@1.4.8-beta.6`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#10673