node
node copied to clipboard
Can we supress the new experimental warning from the new default require(esm) setting?
What is the problem this feature will solve?
I use NVM for Windows.
- I run
nvm install 23.0.0
-
v23.0.0
gets installed. - I then run
nvm use 23.0.0
- 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)
- If I then run
npm install svgo -g
, I get the sameExperimentalWarning
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.