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

bug: peer dependency issue between next 12.3.1 and next-auth 4.12.0 #504

Closed
c-ehrlich opened this issue Sep 25, 2022 · 1 comment · Fixed by #506
Closed

bug: peer dependency issue between next 12.3.1 and next-auth 4.12.0 #504

c-ehrlich opened this issue Sep 25, 2022 · 1 comment · Fixed by #506

Comments

@c-ehrlich
Copy link
Member

Provide environment information

System:
OS: macOS 12.5.1
CPU: (8) arm64 Apple M1
Memory: 80.09 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
Yarn: 1.22.19 - ~/Documents/dev/node_modules/.bin/yarn
npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm

Describe the bug

There is a peer dependency issue between next@12.3.1 and next-auth@4.12.0

To reproduce

  • npx create-t3-app@latest or npx create-t3-app@next
  • select all options
  • install packages using npm or pnpm
  • npm and pnpm will error on default peer dependency settings, yarn will install but give a warning

Additional information

? Will you be using JavaScript or TypeScript? TypeScript
Good choice! Using TypeScript!
? Which packages would you like to enable? nextAuth, prisma, tailwind, trpc
? Initialize a new git repository? No
Sounds good! You can come back and run git init later.
? Would you like us to run npm install? Yes
Alright. We'll install the dependencies for you!

Using: npm

✔ aab scaffolded successfully!

Installing packages...
⠦ Installing nextAuth...Aborting installation...
Error: Command failed: npm install  next-auth @next-auth/prisma-adapter
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: template@0.1.0
npm ERR! Found: next@12.3.1
npm ERR! node_modules/next
npm ERR!   next@"12.3.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer next@"12.2.5" from next-auth@4.12.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.
npm ERR!
npm ERR! See /Users/ce-dev/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ce-dev/.npm/_logs/2022-09-25T14_39_27_902Z-debug-0.log
@jjhiggz
Copy link

jjhiggz commented Sep 25, 2022

I am messing around with this right now. I'm not really qualified to fix it, but I did notice that on my computer if I say "no" to "Do you want to run npm install", then it will set up the boilerplate correctly.

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

Successfully merging a pull request may close this issue.

2 participants