cant install @better-auth/stripe due to peer stripe@"^18" #2147

Closed
opened 2026-03-13 09:30:24 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @the-vampiire on GitHub (Oct 18, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. install latest stripe: npm i stripe (^19.1)
  2. install @better-auth/stripe: npm i @better-auth/stripe

Current vs. Expected behavior

npm install @better-auth/stripe

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving:
npm error Found: stripe@19.1.0
npm error node_modules/stripe
npm error   stripe@"^19.1.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer stripe@"^18" from @better-auth/stripe@1.3.27
npm error node_modules/@better-auth/stripe
npm error   @better-auth/stripe@"*" 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.

What version of Better Auth are you using?

1.3.27

System info

{
  "system": {
    "platform": "darwin",
    "arch": "arm64",
    "version": "Darwin Kernel Version 24.6.0: Mon Aug 11 21:15:09 PDT 2025; root:xnu-11417.140.69.701.11~1/RELEASE_ARM64_T6041",
    "release": "24.6.0",
    "cpuCount": 16,
    "cpuModel": "Apple M4 Max",
    "totalMemory": "128.00 GB",
    "freeMemory": "34.80 GB"
  },
  "node": {
    "version": "v22.17.1",
    "env": "development"
  },
  "packageManager": {
    "name": "npm",
    "version": "10.9.2"
  },
  "frameworks": [
    {
      "name": "next",
      "version": "^15.5.5"
    },
    {
      "name": "react",
      "version": "19.1.0"
    }
  ],
  "databases": [
    {
      "name": "better-sqlite3",
      "version": "^12.4.1"
    },
    {
      "name": "kysely",
      "version": "^0.28.8"
    }
  ],
  "betterAuth": {
    "version": "^1.3.27",
    "config": null
  }
}

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

Package

Originally created by @the-vampiire on GitHub (Oct 18, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. install latest stripe: `npm i stripe` (`^19.1`) 2. install `@better-auth/stripe`: `npm i @better-auth/stripe` ### Current vs. Expected behavior ```sh npm install @better-auth/stripe npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: npm error Found: stripe@19.1.0 npm error node_modules/stripe npm error stripe@"^19.1.0" from the root project npm error npm error Could not resolve dependency: npm error peer stripe@"^18" from @better-auth/stripe@1.3.27 npm error node_modules/@better-auth/stripe npm error @better-auth/stripe@"*" 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. ``` ### What version of Better Auth are you using? 1.3.27 ### System info ```bash { "system": { "platform": "darwin", "arch": "arm64", "version": "Darwin Kernel Version 24.6.0: Mon Aug 11 21:15:09 PDT 2025; root:xnu-11417.140.69.701.11~1/RELEASE_ARM64_T6041", "release": "24.6.0", "cpuCount": 16, "cpuModel": "Apple M4 Max", "totalMemory": "128.00 GB", "freeMemory": "34.80 GB" }, "node": { "version": "v22.17.1", "env": "development" }, "packageManager": { "name": "npm", "version": "10.9.2" }, "frameworks": [ { "name": "next", "version": "^15.5.5" }, { "name": "react", "version": "19.1.0" } ], "databases": [ { "name": "better-sqlite3", "version": "^12.4.1" }, { "name": "kysely", "version": "^0.28.8" } ], "betterAuth": { "version": "^1.3.27", "config": null } } ``` ### Which area(s) are affected? (Select all that apply) Package
GiteaMirror added the dependencies label 2026-03-13 09:30:24 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 18, 2025):

Hi @the-vampiire! I'm Dosu and I’m helping the better-auth team.

This issue happens because @better-auth/stripe v1.3.27 requires stripe@^18 as a peer dependency, so npm blocks installation with stripe@19.x. The good news: support for stripe@19.x was added in a recent update—@better-auth/stripe's peer dependency is now "stripe": "^18 || ^19" and the code handles both versions automatically, including async webhook verification for v19+ details.

If you’re still seeing this error, it means the update hasn’t been published to npm yet. You can either wait for the next release, use --legacy-peer-deps to bypass the check (not recommended for production), or install directly from the updated GitHub branch if you need stripe@19.x support right now.

Once the new version is published, just upgrade @better-auth/stripe and you’ll be able to use it with stripe@19.x without any changes to your code.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Oct 18, 2025): <!-- Greeting --> Hi @the-vampiire! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> This issue happens because @better-auth/stripe v1.3.27 requires stripe@^18 as a peer dependency, so npm blocks installation with stripe@19.x. The good news: support for stripe@19.x was added in a recent update—@better-auth/stripe's peer dependency is now `"stripe": "^18 || ^19"` and the code handles both versions automatically, including async webhook verification for v19+ [details](https://github.com/better-auth/better-auth/pull/5346). If you’re still seeing this error, it means the update hasn’t been published to npm yet. You can either wait for the next release, use `--legacy-peer-deps` to bypass the check (not recommended for production), or install directly from the updated GitHub branch if you need stripe@19.x support right now. Once the new version is published, just upgrade @better-auth/stripe and you’ll be able to use it with stripe@19.x without any changes to your code. <!-- 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/cd117b99-2fb6-47a2-bf20-d7cdbbab261e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/cd117b99-2fb6-47a2-bf20-d7cdbbab261e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/cd117b99-2fb6-47a2-bf20-d7cdbbab261e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/cd117b99-2fb6-47a2-bf20-d7cdbbab261e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/cd117b99-2fb6-47a2-bf20-d7cdbbab261e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/cd117b99-2fb6-47a2-bf20-d7cdbbab261e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/cd117b99-2fb6-47a2-bf20-d7cdbbab261e?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&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/5398)
Author
Owner

@the-vampiire commented on GitHub (Oct 18, 2025):

incorrect, you can see from the logs that it is installing the latest version of the plugin

npm error peer stripe@"^18" from @better-auth/stripe@1.3.27
@the-vampiire commented on GitHub (Oct 18, 2025): incorrect, you can see from the logs that it is installing the latest version of the plugin ```sh npm error peer stripe@"^18" from @better-auth/stripe@1.3.27 ```
Author
Owner

@Bekacru commented on GitHub (Oct 22, 2025):

can you try it with latest?

@Bekacru commented on GitHub (Oct 22, 2025): can you try it with latest?
Author
Owner

@bytaesu commented on GitHub (Nov 20, 2025):

Closing this issue. Please comment if the problem persists.

@bytaesu commented on GitHub (Nov 20, 2025): Closing this issue. Please comment if the problem persists.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2147