-
Notifications
You must be signed in to change notification settings - Fork 365
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
Node experimental feature warning leaking to CLI #4608
Comments
NodeJS currently doesn't allow suppressing individual categories of warning. There are multiple feature requests to do this in NodeJS: nodejs/node#40940, nodejs/node#30810. But, all warnings can be disabled by:
@minivan Do you think we should fix this now? (Since this'll also remove warnings for deprecated feature use, unhandled promise rejections, memory leak detection for event emitter, custom warnings created through Ref: |
oh, if it's a node issue then I don't think we need to do anything 😢 |
This is fixed with #4998 Once the next release is published it will go away. |
@tinfoil-knight Excuse me from necroing this a bit, I wanted to put forth an idea. Do you think it would be reasonable, as a library author, to use something like this to selectively remove warnings? I stumbled across this issue while dealing with a similar problem for a library I maintain, its just something I wanted to think about 🤔. I don't see a huge issue with it, and it makes it pretty clear that you are explicitly ignoring a class of warnings. process.removeAllListeners('warning');
process.on('warning', (l) => {
if (l.name !== 'ExperimentalWarning') {
console.warn(l)
}
});
fetch('some-url').catch(() => {}); |
@AgentEnder Considering that |
Huh, yeah that definitely makes sense. I think as the author of CLI tooling, that should be fine, just not as a library-type dependency. For instance, I work on Nx. If we were to do that I think it'd be fine (we don't need to right now of course), but I wouldn't want a plugin author to do that. |
hy i have the same problem but where should I pass --no-warnings |
Describe the bug
The following warning appear when I run netlify-cli.
Steps to reproduce
Run
netlify status
.Note: Also happens with other commands
Configuration
None.
Environment
System:
OS: Linux 5.17 Arch Linux
CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
Memory: 6.53 GB / 15.61 GB
Container: Yes
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.1.0 - /bin/node
Yarn: 1.22.18 - /bin/yarn
npm: 8.5.5 - /bin/npm
npmGlobalPackages:
netlify-cli: 10.3.1
The text was updated successfully, but these errors were encountered: