Skip to content

Can we supress the new experimental warning from the new default require(esm) setting? #55417

Closed
@futuremotiondev

Description

@futuremotiondev

What is the problem this feature will solve?

I use NVM for Windows.

  1. I run nvm install 23.0.0
  2. v23.0.0 gets installed.
  3. I then run nvm use 23.0.0
  4. I then run npm install npm@latest -g

The latest npm gets installed, but I also get the following output pollution:

(node:32728) ExperimentalWarning: Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
  1. If I then run npm install svgo -g, I get the same ExperimentalWarning pollution.

Is there any way I can suppress this message by default while still leaving the new default require(esm) setting enabled? I don't want to see this warning every time I install a global package, especially since I am automating things.

This doesn't happen with any node versions prior to 23.0.0.

Appreciate any consideration.

What is the feature you are proposing to solve the problem?

A global configuration setting to suppress this new warning every time I install a global module in v23.0.0:

(node:32728) ExperimentalWarning: Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

What alternatives have you considered?

Nothing yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    esmIssues and PRs related to the ECMAScript Modules implementation.moduleIssues and PRs related to the module subsystem.questionIssues that look for answers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions