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

React 18.0.0 version conflict via use-subscription dependency #35707

Closed
1 task done
samc opened this issue Mar 29, 2022 · 3 comments · Fixed by #35746
Closed
1 task done

React 18.0.0 version conflict via use-subscription dependency #35707

samc opened this issue Mar 29, 2022 · 3 comments · Fixed by #35746
Labels
bug Issue was opened via the bug report template.

Comments

@samc
Copy link

samc commented Mar 29, 2022

Verify canary release

  • I verified that the issue exists in Next.js canary release

Provide environment information

Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Wed Mar 2 00:30:59 UTC 2022
Binaries:
Node: 16.4.0
npm: 7.18.1
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 12.1.2
react: 18.0.0
react-dom: 18.0.0

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

Looks like the latest React bump to 18.0.0 introduced a dependency conflict with use-subscription at:

"use-subscription": "1.5.1"

Receiving the following via create-next-app:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react@18.0.0
npm ERR! node_modules/react
npm ERR!   react@"*" from the root project
npm ERR!   peer react@"^17.0.2 || ^18.0.0-0" from next@12.1.2
npm ERR!   node_modules/next
npm ERR!     next@"*" from the root project
npm ERR!   2 more (react-dom, styled-jsx)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from use-subscription@1.5.1
npm ERR! node_modules/next/node_modules/use-subscription
npm ERR!   use-subscription@"1.5.1" from next@12.1.2
npm ERR!   node_modules/next
npm ERR!     next@"*" 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 /home/sam/.npm/eresolve-report.txt for a full report.

Expected Behavior

Running npx create-next-app should skaffold a new Next.js project.

To Reproduce

  1. Run npx create-next-app
@samc samc added the bug Issue was opened via the bug report template. label Mar 29, 2022
@imben1109
Copy link

imben1109 commented Mar 30, 2022

Do you try new version of nodejs 16 (e.g. 16.14.2)? It works for me.

@ijjk
Copy link
Member

ijjk commented Mar 31, 2022

Hi, this has been updated in the latest version of Next.js v12.1.3, please update and give it a try!

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants