Skip to content

Getting an error saying f is not a constructor #1725

Open
@PenghaiZhang

Description

@PenghaiZhang

Expected Behavior

We have recently upgraded our build tool Parcel to v2.13.3, and since then we started having an error about f is not a constructor.

Image

This is how we use the parser:

  1. Import the parser through import HTMLReactParser from "html-react-parser";
  2. Pass a string to the parser

Image

It's expected no errors should occur.

We are using 3.0.16, but the error still occurs after we upgrade to 5.2.2. However, the error message is a bit more readable after the upgrade - Text is not a constructor.

Actual Behavior

Getting the error as described above.

Steps to Reproduce

Not sure if the issue is related to Parcel 2.13.x, but this is the only thing we did to trigger the issue.

Environment

  • Version: both 3.0.16 and 5.2.2
  • Platform:
  • Browser: Chrome 131.0.6778.204
  • OS: Ubuntu 22

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions