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 19 RC Error #1436

Closed
Oksitaine opened this issue May 25, 2024 · 3 comments
Closed

React 19 RC Error #1436

Oksitaine opened this issue May 25, 2024 · 3 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@Oksitaine
Copy link

Expected Behavior

I only want to download this librairie with nodes :

npm i html-react-parser

Actual Behavior

I can't use this one with the new version for NextJS 15 RC, and the trust problem is React 19 with new compilator :

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: directusblog@0.1.0
npm ERR! Found: react@19.0.0-rc-f994737d14-20240522
npm ERR! node_modules/react
npm ERR!   react@"19.0.0-rc-f994737d14-20240522" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"0.14 || 15 || 16 || 17 || 18" from html-react-parser@5.1.10
npm ERR! node_modules/html-react-parser
npm ERR!   html-react-parser@"*" 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! 
npm ERR! For a full report see:
npm ERR! /Users/wglint/.npm/_logs/2024-05-25T22_29_10_622Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /Users/wglint/.npm/_logs/2024-05-25T22_29_10_622Z-debug-0.log

Steps to Reproduce

Install and use the last version of react 19 and try download this node dependancy

Environment

  • Browser: Chrome
  • OS: MacOS

Keywords

I thinks html-react-parser need to update peerDeps for react 19, that will be great !

@Oksitaine Oksitaine added the bug Something isn't working label May 25, 2024
@remarkablemark remarkablemark added wontfix This will not be worked on and removed bug Something isn't working labels May 25, 2024
@remarkablemark
Copy link
Owner

remarkablemark commented May 25, 2024

@Oksitaine thanks for opening this issue, I checked npm and react@19 has not been released yet: https://www.npmjs.com/package/react?activeTab=versions

Can you use overrides or resolutions in your package.json to override the version of html-react-parser in your project?

@Oksitaine
Copy link
Author

Oksitaine commented May 26, 2024

@remarkablemark I talk about this version of react 19 rc. We can see it in the latest version on he npm page.

I made like you say a overrides in my package.json :

  "dependencies": {
    "babel-plugin-react-compiler": "^0.0.0-experimental-592953e-20240517",
    "html-react-parser": "^5.1.10",
    "next": "15.0.0-rc.0",
    "react": "19.0.0-rc-f994737d14-20240522",
    "react-dom": "19.0.0-rc-f994737d14-20240522"
  },
  "overrides": {
    "html-react-parser": {
      "react": "19.0.0-rc-f994737d14-20240522"
    }
  },

And it's work perfecty ! html-react-parser work great with the new react compilator ( and SSG with Nextjs 15 to ) !

Thanks you for the tips with overrides, it's the first time i use it and it's great !

@remarkablemark
Copy link
Owner

@Oksitaine Great to hear that overrides works. Since react@19-rc is still a release candidate, we won't update the react version in peerDependencies until the stable version 19 is released.

If the issue is resolved, do you mind closing it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants