Uncaught TypeError: DomHandler is not a constructor
Closed this issue ยท 8 comments
Hello, good morning.
The html-to-react
version I'm using is the latest.
I'm trying to parse the following string into JSX:
"By using the site, you acknowledge you have read our <a href=/privacy-policy>Privacy Policy</a>,
and agree to our <a href=/terms-and-conditions>Terms and Conditions</a>."
For some reason, I get the following error stack:
parser.js:16 Uncaught TypeError: DomHandler is not a constructor
at parseHtmlToTree (parser.js:16)
at parseWithInstructions (parser.js:61)
at Object.parse (parser.js:71)
I checked domhandler
package and apparently there are no breaking changes. Could you guys help?
Same issue here with 1.4.0
. Reverting to 1.3.4
works fine.
Does the test suite of html-to-react fail for you? It works for me, but this looks like something that would break as part of the test suite.
I think you must have stale dependencies, since I upgraded the domhandler package and I'm using it according to current API and html-to-react does work locally for me.
@julianaleon Have you verified your dependencies are not stale, as I mentioned as a distinct possibility earlier for this issue?
any update?
@tiyunchen Please see my questions in earlier comments regarding stale dependencies.
Closing the issue for now, due to inactivity.