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

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

Closed
vedantmgoyal9 opened this issue Nov 1, 2022 · 6 comments · Fixed by #5710
Closed

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

vedantmgoyal9 opened this issue Nov 1, 2022 · 6 comments · Fixed by #5710
Labels
triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@vedantmgoyal9
Copy link
Contributor

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.

@vedantmgoyal9 vedantmgoyal9 added the triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. label Nov 1, 2022
@vedantmgoyal9
Copy link
Contributor Author

Since, #5657 has not been released, npm still matches ^12.2.5 and fails! To fix this, a new release should be made containg the fix. Last release was - next-auth@v4.15.0.

@jeffaus
Copy link

jeffaus commented Nov 3, 2022

Just an FYI - for now you can use the --force flag and it will install it anyway. I've tested locally and it works.

Not ideal if you need it for production, but if your project is still in dev phase you can probably get away with it until next-auth bring out a compatible version.

@Schlumpf9
Copy link

+1

@rawnly
Copy link

rawnly commented Nov 3, 2022

Just an FYI - for now you can use the --force flag and it will install it anyway. I've tested locally and it works.

Do you have any solution for pnpm? Seems like ignoring any given flag and it installs 12.* (see more here)

@jeffaus
Copy link

jeffaus commented Nov 3, 2022

Do you have any solution for pnpm? Seems like ignoring any given flag and it installs 12.* (see more here)

No sorry, I unfortunately don't have much experience with pnpm.

Is it interchangeable with npm the way yarn is? If so, perhaps you could just temporarily switch to npm until next-auth release a compatible version?

@rawnly
Copy link

rawnly commented Nov 4, 2022

@jeffaus solved temporarly by installing next-auth@0.0.0-pr.5657.4f991076

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants