-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we supress the new experimental warning from the new default require(esm) setting? #55417
Comments
You can use |
Or disable |
How can I do this globally though?
Am I missing something? |
I also created a machine-wide environment variable called And yes I tried restarting the console so the environment variable gets refreshed, but still the same output. EDIT: Printing |
I don't know much about Windows, sorry. |
This feature is experimental, so it emits a warning. IMHO this is working as intended. If npm is using an experimental feature, it should be their responsibility to figure out how to handle the warning |
I believe he is asking for a way to not showing the warning.
|
Having same error. Partly resolved in local terminal by removing and installing node and npm. Now when running from local terminal no error message. Else this was throwing whenever I was using npm like npm install, npm start etc. Also installed tsx and recommended in search. So that works without error. But when using skaffold dev it getst stuck at the following two lines Lot of googling but no luck. |
For example, even with no npm modules installed, executing
Many other often-used npm cli commands also provoke the warning:
|
My point is, I don't believe this is a bug in the Node.js project. In npm–perhaps, however, on this side of the ecosystem, at least how I see it, the feature should, by default, emit a warning. |
|
The warning from See the following for more details: |
as @climba03003 mentioned in #55417 (comment) - for the end users, if they want to supress the warning, they could use
Or if it's run by an executable that's not For a package that does |
"For v22 we will supress warnings from code within node_modules and v24 will probably not have the warning as it should be stable by then." Then why bother with the warning? It's lit up my server code like crazy, I didn't ask for this. If it's so experimental shouldn't it be an opt-in flag for now? |
Is the server code running multiple processes/workers? This should only be emitted once per process/worker.
It was previously behind a flag. The standard graduation process of an experimental feature is:
For odd-number releases, which are usually more edgy and less used in production, it's common to expect more experiments being carried out and more warnings being emitted. You can consider using the even-numbered LTS if stability is a priority, or if you must use v23, you could use the |
* node-v24 this might not be needed see nodejs/node#55417
What is the problem this feature will solve?
I use NVM for Windows.
nvm install 23.0.0
v23.0.0
gets installed.nvm use 23.0.0
npm install npm@latest -g
The latest npm gets installed, but I also get the following output pollution:
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:
What alternatives have you considered?
Nothing yet.
The text was updated successfully, but these errors were encountered: