Skip to content

Can't install next-auth when next 13 is installed #5705

@vedantmgoyal9

Description

@vedantmgoyal9

Environment

System:
OS: Linux 5.4 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
CPU: (4) x64 Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Memory: 3.32 GB / 7.77 GB
Container: No
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 18.10.0 - /usr/local/share/nvm/current/bin/node
Yarn: 1.22.19 - /usr/bin/yarn
npm: 8.19.2 - /usr/local/share/nvm/current/bin/npm
npmPackages:
next: ^13.0.1 => 13.0.1
react: ^18.2.0 => 18.2.0

Reproduction URL

N/A

Describe the issue

Installation of next-auth fails when next v13.0.1 is already installed.

npm ERR! Found: next@13.0.1
npm ERR! node_modules/next
npm ERR!   next@"^13.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^12.2.5" from next-auth@4.15.0
npm ERR! node_modules/next-auth
npm ERR!   next-auth@"*" from the root project
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.

How to reproduce

Run npm i next-auth in a project with next 13.0.1 already installed.

Expected behavior

Should install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions