Skip to content

Peer dependency blocks installation with SvelteKit 3 (prerelease) #10928

Description

@olegpolin

Is this suited for github?

  • Yes, this is suited for github

Reproduction

Create a new SvelteKit 3 app with npx sv@next create.
Attempt to add better-auth with the official addon npx sv@next add better-auth and get error

Failed to install dependencies
│  npm error code ERESOLVE
│  npm error ERESOLVE could not resolve
│  npm error
│  npm error While resolving: better-auth@1.7.1
│  npm error Found: @sveltejs/kit@3.0.0-next.25
│  npm error node_modules/@sveltejs/kit
│  npm error   dev @sveltejs/kit@"^3.0.0-next.0" from the root project
│  npm error   peer @sveltejs/kit@"^3.0.0-next.0" from @sveltejs/adapter-auto@8.0.0-next.3
│  npm error   node_modules/@sveltejs/adapter-auto
│  npm error     dev @sveltejs/adapter-auto@"^8.0.0-next.3" from the root project
│  npm error
│  npm error Could not resolve dependency:
│  npm error peerOptional @sveltejs/kit@"^2.0.0" from better-auth@1.7.1
│  npm error node_modules/better-auth
│  npm error   dev better-auth@"^1.6.24" from the root project
│  npm error   better-auth@"1.7.1" from auth@1.7.1
│  npm error   node_modules/auth
│  npm error     dev auth@"^1.6.24" from the root project
│  npm error
│  npm error Conflicting peer dependency: @sveltejs/kit@2.70.3
│  npm error node_modules/@sveltejs/kit
│  npm error   peerOptional @sveltejs/kit@"^2.0.0" from better-auth@1.7.1
│  npm error   node_modules/better-auth
│  npm error     dev better-auth@"^1.6.24" from the root project
│  npm error     better-auth@"1.7.1" from auth@1.7.1
│  npm error     node_modules/auth
│  npm error       dev auth@"^1.6.24" from the root project
│  npm error
│  npm error Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
│  npm error
│  npm error

Current vs. Expected behavior

The peer dependency range should be widened to support SvelteKit 3

What version of Better Auth are you using?

1.7.1

System info

Latest versions of everything

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    platformExpo, Electron, framework integrations

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions