better-auth 1.4.7 upstream dependency conflict, peer dependency drizzle-orm@0.41.0 #2531

Closed
opened 2026-03-13 10:01:03 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @colinwilson on GitHub (Dec 15, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

better-auth 1.4.7's peer dependency on "drizzle-orm": "^0.41.0", results in an upstream dependency conflict with drizzle-orm@0.45.1 installed:

npm error While resolving: better-auth@1.4.7
npm error Found: drizzle-orm@0.45.1
npm error node_modules/drizzle-orm
npm error   drizzle-orm@"0.45.1" from api@0.1.0
npm error   apps/api
npm error     api@0.1.0
npm error     node_modules/api
npm error       workspace apps\api from the root project
npm error   drizzle-orm@"0.45.1" from dashboard@0.1.0
npm error   apps/dashboard
npm error     dashboard@0.1.0
npm error     node_modules/dashboard
npm error       workspace apps\dashboard from the root project
npm error
npm error Could not resolve dependency:
npm error peerOptional drizzle-orm@"^0.41.0" from better-auth@1.4.7
npm error apps/api/node_modules/better-auth
npm error   better-auth@"1.4.7" from api@0.1.0
npm error   apps/api
npm error     api@0.1.0
npm error     node_modules/api
npm error       workspace apps\api from the root project
npm error   peer better-auth@"1.4.7" from @better-auth/passkey@1.4.7
npm error   apps/api/node_modules/@better-auth/passkey
npm error     @better-auth/passkey@"1.4.7" from api@0.1.0
npm error     apps/api
npm error       api@0.1.0
npm error       node_modules/api
npm error
npm error Conflicting peer dependency: 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   apps/api/node_modules/better-auth
npm error     better-auth@"1.4.7" from api@0.1.0
npm error     apps/api
npm error       api@0.1.0
npm error       node_modules/api
npm error         workspace apps\api from the root project
npm error     peer better-auth@"1.4.7" from @better-auth/passkey@1.4.7
npm error     apps/api/node_modules/@better-auth/passkey
npm error       @better-auth/passkey@"1.4.7" from api@0.1.0
npm error       apps/api
npm error         api@0.1.0
npm error         node_modules/api
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.

Current vs. Expected behavior

Support for Drizzle 0.45.1

What version of Better Auth are you using?

1.4.7

System info

no output via `npx @better-auth/cli info --json`

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

Package

Additional context

I attempted an update from better-auth 1.4.6 to 1.4.7 with drizzle-orm@0.45.1 installed

"dependencies": {
        "@better-auth/passkey": "^1.4.6",
        "better-auth": "^1.4.6",
        "drizzle-orm": "^0.45.1",
        ...
    },
Originally created by @colinwilson on GitHub (Dec 15, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce better-auth `1.4.7`'s peer dependency on `"drizzle-orm": "^0.41.0"`, results in an `upstream dependency conflict` with `drizzle-orm@0.45.1` installed: ``` npm error While resolving: better-auth@1.4.7 npm error Found: drizzle-orm@0.45.1 npm error node_modules/drizzle-orm npm error drizzle-orm@"0.45.1" from api@0.1.0 npm error apps/api npm error api@0.1.0 npm error node_modules/api npm error workspace apps\api from the root project npm error drizzle-orm@"0.45.1" from dashboard@0.1.0 npm error apps/dashboard npm error dashboard@0.1.0 npm error node_modules/dashboard npm error workspace apps\dashboard from the root project npm error npm error Could not resolve dependency: npm error peerOptional drizzle-orm@"^0.41.0" from better-auth@1.4.7 npm error apps/api/node_modules/better-auth npm error better-auth@"1.4.7" from api@0.1.0 npm error apps/api npm error api@0.1.0 npm error node_modules/api npm error workspace apps\api from the root project npm error peer better-auth@"1.4.7" from @better-auth/passkey@1.4.7 npm error apps/api/node_modules/@better-auth/passkey npm error @better-auth/passkey@"1.4.7" from api@0.1.0 npm error apps/api npm error api@0.1.0 npm error node_modules/api npm error npm error Conflicting peer dependency: 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 apps/api/node_modules/better-auth npm error better-auth@"1.4.7" from api@0.1.0 npm error apps/api npm error api@0.1.0 npm error node_modules/api npm error workspace apps\api from the root project npm error peer better-auth@"1.4.7" from @better-auth/passkey@1.4.7 npm error apps/api/node_modules/@better-auth/passkey npm error @better-auth/passkey@"1.4.7" from api@0.1.0 npm error apps/api npm error api@0.1.0 npm error node_modules/api 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. ``` ### Current vs. Expected behavior Support for Drizzle [`0.45.1`](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.1) ### What version of Better Auth are you using? 1.4.7 ### System info ```bash no output via `npx @better-auth/cli info --json` ``` ### Which area(s) are affected? (Select all that apply) Package ### Additional context I attempted an update from better-auth `1.4.6` to `1.4.7` with `drizzle-orm@0.45.1` installed ``` "dependencies": { "@better-auth/passkey": "^1.4.6", "better-auth": "^1.4.6", "drizzle-orm": "^0.45.1", ... }, ```
GiteaMirror added the dependencies label 2026-03-13 10:01:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 15, 2025):

This is a known peer dependency conflict: better-auth@1.4.7 pins drizzle-orm as an optional peer dependency at ^0.41.0, which does not include 0.45.1, so npm throws a conflict error when you try to use a newer version. The maintainers are aware, but as of now, there’s no official release or beta that expands support to drizzle-orm@0.45.1 (source, source).

Workarounds: you can install with --force or --legacy-peer-deps to bypass npm’s strict checks, or use pnpm (which is more lenient with optional peers), but these approaches may risk unsupported or unstable setups. Alternatively, you can downgrade drizzle-orm to a supported version, or switch to a compatible Drizzle driver like node-postgres or postgres-js if that fits your stack (source).

Keep an eye on future releases for expanded support. If you do bypass the peer check, be aware that the drizzle adapter relies on API compatibility and doesn’t enforce runtime version checks, so you may encounter subtle issues if there are breaking changes between drizzle-orm 0.41.x and 0.45.x (source).

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 15, 2025): <!-- Answer --> This is a known peer dependency conflict: better-auth@1.4.7 pins drizzle-orm as an optional peer dependency at ^0.41.0, which does not include 0.45.1, so npm throws a conflict error when you try to use a newer version. The maintainers are aware, but as of now, there’s no official release or beta that expands support to drizzle-orm@0.45.1 ([source](https://github.com/better-auth/better-auth/pull/6654), [source](https://github.com/better-auth/better-auth/issues/6746)). Workarounds: you can install with --force or --legacy-peer-deps to bypass npm’s strict checks, or use pnpm (which is more lenient with optional peers), but these approaches may risk unsupported or unstable setups. Alternatively, you can downgrade drizzle-orm to a supported version, or switch to a compatible Drizzle driver like node-postgres or postgres-js if that fits your stack ([source](https://github.com/better-auth/better-auth/issues/4747#issuecomment-3314994794)). Keep an eye on future releases for expanded support. If you do bypass the peer check, be aware that the drizzle adapter relies on API compatibility and doesn’t enforce runtime version checks, so you may encounter subtle issues if there are breaking changes between drizzle-orm 0.41.x and 0.45.x ([source](https://github.com/better-auth/better-auth/blob/f59fe3a19974805357d3f6dd54731247c0be3f3c/packages/better-auth/package.json#L499-L549)). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/5e3a582b-a8f2-442c-b981-3b7c60f5b1eb?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5e3a582b-a8f2-442c-b981-3b7c60f5b1eb?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5e3a582b-a8f2-442c-b981-3b7c60f5b1eb?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5e3a582b-a8f2-442c-b981-3b7c60f5b1eb?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5e3a582b-a8f2-442c-b981-3b7c60f5b1eb?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5e3a582b-a8f2-442c-b981-3b7c60f5b1eb?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5e3a582b-a8f2-442c-b981-3b7c60f5b1eb?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20peer%20dependency%20conflict%3A%20better-auth%401.4.7%20pins%20drizzle-orm%20as%20an%20optional%20peer%20dependency%20at%20%5E0.41.0%2C%20which%20does%20not%20include%200.45.1%2C%20so%20npm%20throws%20a%20conflict%20error%20when%20you%20try%20to%20use%20a%20newer%20version.%20The%20maintainers%20are%20aware%2C%20but%20as%20of%20now%2C%20there%E2%80%99s%20no%20official%20release%20or%20beta%20that%20expands%20support%20to%20drizzle-orm%400.45.1%C2%A0%28%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/pull/6654%29%2C%20%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/issues/6746%29%29.%0A%0AWorkarounds%3A%20you%20can%20install%20with%20--force%20or%20--legacy-peer-deps%20to%20bypass%20npm%E2%80%99s%20strict%20checks%2C%20or%20use%20pnpm%20%28which%20is%20more%20lenient%20with%20optional%20peers%29%2C%20but%20these%20approaches%20may%20risk%20unsupported%20or%20unstable%20setups.%20Alternatively%2C%20you%20can%20downgrade%20drizzle-orm%20to%20a%20supported%20version%2C%20or%20switch%20to%20a%20compatible%20Drizzle%20driver%20like%20node-postgres%20or%20postgres-js%20if%20that%20fits%20your%20stack%C2%A0%28%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/issues/4747%23issuecomment-3314994794%29%29.%0A%0AKeep%20an%20eye%20on%20future%20releases%20for%20expanded%20support.%20If%20you%20do%20bypass%20the%20peer%20check%2C%20be%20aware%20that%20the%20drizzle%20adapter%20relies%20on%20API%20compatibility%20and%20doesn%E2%80%99t%20enforce%20runtime%20version%20checks%2C%20so%20you%20may%20encounter%20subtle%20issues%20if%20there%20are%20breaking%20changes%20between%20drizzle-orm%200.41.x%20and%200.45.x%C2%A0%28%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/blob/f59fe3a19974805357d3f6dd54731247c0be3f3c/packages/better-auth/package.json%23L499-L549%29%29.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/6765)
Author
Owner

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

same here, it's messing with the ci :(

@uncomplexity commented on GitHub (Dec 15, 2025): same here, it's messing with the ci :(
Author
Owner

@suprabhat15 commented on GitHub (Dec 15, 2025):

On executing npm install, still getting error:

Image
"dependencies": {
 "@polar-sh/better-auth": "^1.6.1",
 "better-auth": "^1.4.7"
}
@suprabhat15 commented on GitHub (Dec 15, 2025): On executing `npm install`, still getting error: <img width="550" height="231" alt="Image" src="https://github.com/user-attachments/assets/f216c2df-0cac-4e21-90f7-a7c8925487ae" /> ``` "dependencies": { "@polar-sh/better-auth": "^1.6.1", "better-auth": "^1.4.7" } ```
Author
Owner

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

will reflect on next release 1.4.8 onwards; for now i downgraded to 1.4.6 works fine

@uncomplexity commented on GitHub (Dec 15, 2025): will reflect on next release 1.4.8 onwards; for now i downgraded to 1.4.6 works fine
Author
Owner

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

We haven't released a new version yet.

@himself65 commented on GitHub (Dec 16, 2025): We haven't released a new version yet.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2531