Skip to content

Combine ERR_REQUIRE_ESM with warning #30599

Closed
@guybedford

Description

@guybedford

Now that modules are unflagged, the warning for ERR_REQUIRE_ESM when loading a .js file that would be interpreted as a module is being thrown along with the warning message in https://github.com/nodejs/node/blob/master/lib/internal/modules/cjs/loader.js#L1193.

This hinders approaches that want to use this error to explicitly check for support.

Ideally the warning can just be combined with the error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    esmIssues and PRs related to the ECMAScript Modules implementation.good first issueIssues that are suitable for first-time contributors.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions