Skip to content

Does not work in a ESM project #1929

@kibertoad

Description

@kibertoad

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions