Skip to content

Installation/compatibility issue: NextAuth with Next.js 16 #13302

@rezwana-karim

Description

@rezwana-karim

Environment

System:
  OS: Windows 11
Binaries:
  Node: 22.17.0
  npm: 11.6.2

Packages:
  next: 16.0.0
  react: 19.0.0
  next-auth: 4.24.11 or 5.0.0

Reproduction URL

https://github.com/syed-reza98/StormCom

Describe the issue

When installing NextAuth ([email protected] or 5.0.0) in a project using Next.js 16.0.0, npm reports a peer dependency error:

Could not resolve dependency:
peer next@"^12.2.5 || ^13 || ^14 || ^15" from [email protected]

This blocks installation unless using --legacy-peer-deps or --force. The documentation is unclear whether NextAuth v5+ is intended to support Next.js 16 out of the box. Please clarify:

  • Is Next.js 16 officially supported (and from which next-auth release)?
  • Does NextAuth v5 peerDependency range need to be updated for Next.js 16?
  • Are there any new migration or configuration steps specific to Next.js 16?

Steps taken:

  • Tried both next-auth v4 and v5
  • Encountered peer dependency error on install
  • Checked migration docs, could not find explicit Next.js 16 guidance

How to reproduce

  1. Create a new Next.js 16.0.0 project
  2. Run npm install next-auth
  3. Observe dependency conflict error
  4. Try with latest next-auth@beta/v5, same result

Expected behavior

  • next-auth should install cleanly with Next.js 16
  • Documentation should clearly state support for Next.js 16 and any required migration steps

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions