Skip to content

[Bug]: ERR_REQUIRE_ESM with [email protected] #2583

@ddolcimascolo

Description

@ddolcimascolo

🔎 Search Terms

require esm breaking change

The problem

Hello,

I suppose this breaking change wasn't intended and is a consequence of the bump of the diagnostics package...

Cheers,
David

What version of Winston presents the issue?

v3.18.0

What version of Node are you using?

v22.11.0

If this worked in a previous version of Winston, which was it?

v3.17.x

Minimum Working Example

Just require('winston') in a commonjs module.

Additional information

Exception during run: Error [ERR_REQUIRE_ESM]: require() of ES Module /builds/stordata/spoolx/node_modules/@so-ric/colorspace/index.js from /builds/stordata/spoolx/node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js not supported.
Instead change the require of index.js in /builds/stordata/spoolx/node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js to a dynamic import() which is available in all CommonJS modules.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions