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

Does not work in a ESM project #1929

Open
kibertoad opened this issue Oct 9, 2024 · 1 comment
Open

Does not work in a ESM project #1929

kibertoad opened this issue Oct 9, 2024 · 1 comment

Comments

@kibertoad
Copy link

When trying to run a service with the following TSConfig:

		"module": "ESNext",
		"moduleResolution": "node",

an error is thrown:

import { Parser as T } from "../../../../node_modules/htmlparser2/lib/esm/Parser.js";
         ^^^^^^
SyntaxError: Named export 'Parser' not found. The requested module '../../../../node_modules/htmlparser2/lib/esm/Parser.js' is a CommonJS module, which may not support all module.exports as named exports.
@kibertoad
Copy link
Author

Might be related to #1782

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

No branches or pull requests

3 participants
@kibertoad and others