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

html-react-parser with React 19 #1501

Closed
AlessandroGasperini opened this issue Aug 27, 2024 · 4 comments · Fixed by #1627
Closed

html-react-parser with React 19 #1501

AlessandroGasperini opened this issue Aug 27, 2024 · 4 comments · Fixed by #1627
Assignees
Labels
question Further information is requested

Comments

@AlessandroGasperini
Copy link

AlessandroGasperini commented Aug 27, 2024

html-react-parser with React 19

I am experiencing an issue with the html-react-parser package when using it with React 19. I’ve encountered compatibility problems which prevent the package from installing.

Version: 5.1.13

React Version: 19.0.0-rc (release candidate version)

Error Details: When attempting to install or use html-react-parser with React 19, npm reports a peer dependency conflict. The specific error message is:

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error   react@"^19.0.0-rc-fb9a90fa48-20240614" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"0.14 || 15 || 16 || 17 || 18" from [email protected]
npm error node_modules/html-react-parser
npm error   html-react-parser@"*" from the root project
@AlessandroGasperini AlessandroGasperini added the bug Something isn't working label Aug 27, 2024
@remarkablemark
Copy link
Owner

remarkablemark commented Aug 27, 2024

@AlessandroGasperini does this resolve the issue for you? #1436 (comment)

Relates to #1455 (comment)

@remarkablemark remarkablemark added question Further information is requested and removed bug Something isn't working labels Aug 27, 2024
@remarkablemark remarkablemark changed the title Package Name: html-react-parser html-react-parser with React 19 Aug 27, 2024
@KABILANSRK
Copy link

@AlessandroGasperini You should wait for the official release of html-react-parser for React 19.

@aabughazaleh
Copy link

aabughazaleh commented Dec 1, 2024

@AlessandroGasperini
Temp solution:
you can use this in package.json (make sure to use the react version you use in your project, mine is "19.0.0-rc-66855b96-20241106"):

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

@remarkablemark
Copy link
Owner

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

Successfully merging a pull request may close this issue.

5 participants
@remarkablemark @aabughazaleh @AlessandroGasperini @KABILANSRK and others