Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.0.0-beta.10 next 15.1 react 19.0.0 npm install unable to resolve dependency tree #1844

Closed
6 tasks done
ramachandran-muthiah opened this issue Dec 15, 2024 · 6 comments
Closed
6 tasks done

Comments

@ramachandran-muthiah
Copy link

Checklist

Description

I have created a new project in "next": "15.1.0" using npx create-next-app@latest
Whilie installing the Auth0 through npm install @auth0/[email protected] facing npm error ERESOLVE unable to resolve dependency tree

npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error react@"^19.0.0" from the root project
npm error peer react@"^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0" from [email protected]
npm error node_modules/next
npm error next@"15.1.0" from the root project
npm error peer next@"^14.0.0 || ^15.0.0" from @auth0/[email protected]
npm error node_modules/@auth0/nextjs-auth0
npm error @auth0/nextjs-auth0@"4.0.0-beta.10" from the root project
npm error 1 more (react-dom)
npm error
npm error Could not resolve dependency:
npm error peer react@"^18.3.1" from @auth0/[email protected]
npm error node_modules/@auth0/nextjs-auth0
npm error @auth0/nextjs-auth0@"4.0.0-beta.10" 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.

v4.0.0-beta.10 is dependency is not compatible with Next 15.1

Reproduction

  1. Create a new project using npx create-next-app@latest
  2. try to install Auth0 npm i @auth0/[email protected]

Additional context

No response

nextjs-auth0 version

4.0.0-beta.10

Next.js version

15.1.0

Node.js version

v22.2.0

@ArthurLaurijssen
Copy link

I can confirm I have the same issue adding --legacy-peer-deps at least let you install the beta version

@SasSam
Copy link

SasSam commented Dec 15, 2024

Same issue here

@guabu guabu mentioned this issue Dec 16, 2024
@guabu
Copy link

guabu commented Dec 16, 2024

This will be fixed in the upcoming release (4.0.0-beta.11) linked above. As of Next 15.1, React 19 stable is used and our peer dependencies will be updated to reflect that.

@robcaldecott
Copy link

This change will be great, and for the benefit of others, you can also use a package.json override here instead of legacy-peer-deps.

Assuming you have react and react-dom 19 as dependencies:

"overrides": {
  "react": "$react",
  "react-dom": "$react-dom"
}

@gabor-at-reed
Copy link

"overrides": {
  "react": "$react",
  "react-dom": "$react-dom"
}

Or even more targeted:

"overrides": {
    "@auth0/nextjs-auth0": {
        "react": "$react",
        "react-dom": "$react-dom"
    }
}

@guabu
Copy link

guabu commented Dec 17, 2024

This should now be fixed in the latest release 4.0.0-beta.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants