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

NextJS 15 unmet peer react@"^16.11.0 || ^17.0.0 || ^18.0.0": found 19.0.0-rc-65a56d0e-20241020 #3028

Closed
Yonom opened this issue Oct 22, 2024 · 10 comments

Comments

@Yonom
Copy link

Yonom commented Oct 22, 2024

Bug

The supported React peer dep version range for v2.2.5 does not include React 19.0.0-rc
The main branch does, however, no new versions were released in the previous 5 months.

The dependency use-sync-external-store has a similar issue

│   └─┬ swr 2.2.5
│     ├── ✕ unmet peer react@"^16.11.0 || ^17.0.0 || ^18.0.0": found 19.0.0-rc-65a56d0e-20241020
│     └─┬ use-sync-external-store 1.2.2
│       └── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0-rc-65a56d0e-20241020

swr 2.2.5
nextjs 15.0.0
react 19.0.0-rc-65a56d0e-20241020
using pnpm as package manager

@promer94 promer94 added the good first issue Good for newcomers label Oct 23, 2024
@DevOsaWebsite
Copy link

@Yonom try --force option

@Yonom
Copy link
Author

Yonom commented Oct 30, 2024

@promer94 not a "good first issue", the fix has already landed in main 5 months ago, it just needs to be deployed to npm

@promer94 promer94 removed the good first issue Good for newcomers label Nov 4, 2024
@TomerHeber
Copy link

Can this be deployed?
I'm "forced" to use --force with nextjs 15.

Thanks!

@aabughazaleh
Copy link

aabughazaleh commented Nov 21, 2024

you can use this in package.json (make sure to use the react version you use in your project, my "19.0.0-rc-66855b96-20241106"):

  "overrides": {
    "html-react-parser": {
      "react": "19.0.0-rc-66855b96-20241106"
    },
    "swr": {
      "react": "19.0.0-rc-66855b96-20241106"
    }
  },

@dgtllion
Copy link

dgtllion commented Nov 21, 2024

you can use this in package.json (make sure to use the react version you use in your project, my "19.0.0-rc-66855b96-20241106"):

  "overrides": {
    "html-react-parser": {
      "react": "19.0.0-rc-66855b96-20241106"
    },
    "swr": {
      "react": "19.0.0-rc-66855b96-20241106"
    }
  },

ah, nice it worked for me. For pnpm i ended up with:

{
  "pnpm": {
    "overrides": {
      "swr>react": "19.0.0-rc.1",
    },
  }
}

@dhedegaard-digisense
Copy link

When can we expect a new release, that's compatible with React 19?

@Katyi
Copy link

Katyi commented Dec 5, 2024

What version nextjs I should use for avoid this issue?

@aabughazaleh
Copy link

What version nextjs I should use for avoid this issue?

you can use nextjs 14

@dgtllion
Copy link

dgtllion commented Dec 6, 2024

now react 19 is out is it possible to update swr?

@koba04
Copy link
Collaborator

koba04 commented Dec 23, 2024

We've just released v2.3.0, which supports React 19, so I think this issue would be fixed.
https://github.com/vercel/swr/releases/tag/v2.3.0

@koba04 koba04 closed this as completed Dec 23, 2024
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

9 participants