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]: React 19 not added as a peer dependency #1238

Open
1 task
Erod-star opened this issue Dec 16, 2024 · 2 comments · May be fixed by #1236
Open
1 task

[Bug]: React 19 not added as a peer dependency #1238

Erod-star opened this issue Dec 16, 2024 · 2 comments · May be fixed by #1236
Labels

Comments

@Erod-star
Copy link

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

Description ⚠️

I have a project that uses react-chartjs-2 and the 18th version of react and everything used to work just fine. However when I tried to upgrade to React 19, the installation fails when attempting to install dependencies.

The error occurs because I saw @react-chartjs-2 has a peer dependency requirement for react@^16.x || ^17.x || ^18.x, but the project is using React 19.0.0-rc-69d4b800-20241021.

image

The installation works fine with React 18, but I haven't found a workaround. This are some posibble solutions:

  • Update @react-chartjs-2 peer dependencies to include React 19
  • Add a note in the documentation about React 19 compatibility
  • Add a version check in the CLI to warn users about React 19 compatibility issues

Reproduction

https://github.com/Erod-star/react-chartjs-2-react-19-issue

chart.js version

5.2.0

react-chartjs-2 version

5.2.0

Possible solution

No response

@Erod-star Erod-star added the bug label Dec 16, 2024
@dmarcucci
Copy link

@Erod-star FWIW, I've been able to use the --force option with npm install and all has worked fine for me. I admit, however, that this is not ideal and that the project should be updated to accept React 19 as a peer dependency.

@anajavi anajavi linked a pull request Dec 19, 2024 that will close this issue
@ChrisCrossCrash
Copy link

You may want to check out this issue, which is for the same thing: #1235

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

Successfully merging a pull request may close this issue.

3 participants