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

"SyntaxError: The requested module 'node-html-parser' does not provide an export named 'parse'" #160

Closed
Pomax opened this issue Oct 3, 2021 · 4 comments

Comments

@Pomax
Copy link

Pomax commented Oct 3, 2021

Installed 4.1.5, running a project with type: "module" in package.json, and used the syntax import { parse } from 'node-html-parser'; as per the README. Got this error.

@nonara
Copy link
Collaborator

nonara commented Oct 3, 2021

Thanks for the report. This is a duplicate of #139

I have a fix ready. Should be released shortly.

nonara added a commit to nonara/node-html-parser that referenced this issue Oct 3, 2021
Added wrapper for esm over CJS module and removed nonworking separate ESM build (per advice from url below).

Note: Essentially a breaking change as `exports` package.json property prevents direct import from files in dist

see: https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1
nonara added a commit to nonara/node-html-parser that referenced this issue Oct 3, 2021
Added wrapper for esm over CJS module and removed nonworking separate ESM build (per advice from url below).

Note: Essentially a breaking change as `exports` package.json property prevents direct import from files in dist

see: https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1
@nonara nonara mentioned this issue Oct 3, 2021
@Pomax
Copy link
Author

Pomax commented Oct 3, 2021

Nice! As a potentially breaking change, releasing it as a new major version's probably a good idea.

nonara added a commit to nonara/node-html-parser that referenced this issue Oct 3, 2021
Added wrapper for esm over CJS module and removed nonworking separate ESM build (per advice from url below).

Note: Essentially a breaking change as `exports` package.json property prevents direct import from files in dist

see: https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1
nonara added a commit to nonara/node-html-parser that referenced this issue Oct 3, 2021
Added wrapper for esm over CJS module and removed nonworking separate ESM build (per advice from url below).

Note: Essentially a breaking change as `exports` package.json property prevents direct import from files in dist

see: https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1
@nonara
Copy link
Collaborator

nonara commented Oct 3, 2021

Yep. That's the plan. Will post a comment in this thread when it's released.

nonara added a commit to nonara/node-html-parser that referenced this issue Oct 10, 2021
Added wrapper for esm over CJS module and removed nonworking separate ESM build (per advice from url below).

Note: Essentially a breaking change as `exports` package.json property prevents direct import from files in dist

see: https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1
@nonara nonara closed this as completed in 0d4b922 Oct 10, 2021
@nonara
Copy link
Collaborator

nonara commented Oct 10, 2021

Corrected in v5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants