-
Notifications
You must be signed in to change notification settings - Fork 103
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
Support for react 17 #84
Comments
npm install react-html-parser --legacy-peer-deps - its work |
Can we get this #80 merged? |
@durgeshrkumari I left a comment in the merge request about the htmlparser2 dep. Without changing it, I was getting runtime errors in my tests. |
On React v17, tried with and without "npm install react-html-parser --legacy-peer-deps" and still getting errors as: |
i found fork https://github.com/hedgedoc/html-to-react can it help? |
I'm using react 18.2 and have a similar issue.
|
react-html-parser uses an old version of the htmlparser2 package (3.9.2), which uses NodeJS APIs such as Buffer (example). Since Webpack v5, these NodeJS APIs are no longer included by default, you probably need to install node-polyfill-webpack-plugin and add it to the plugins section of your Webpack configuration. |
thanks. i use webpack 4 and 3. |
Yes i'm also facing the same problem , i use for react 17 version this react 17 version support for react-html-parser 3.0.9 |
Its fails on deployment |
I just updated to react 17, which gave me this message:
npm WARN [email protected] requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself.
It'd be great if this could be updated to say it supports React 17. Since there are no feature changes in React 17, it can basically be used as is.
The text was updated successfully, but these errors were encountered: