Node experimental feature warning leaking to CLI
Describe the bug
The following warning appear when I run netlify-cli.
(node:359487) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
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
NodeJS currently doesn't allow suppressing individual categories of warning. There are multiple feature requests to do this in NodeJS: https://github.com/nodejs/node/issues/40940, https://github.com/nodejs/node/issues/30810.
But, all warnings can be disabled by:
- setting
NODE_NO_WARNINGS=1OR - by passing the
--no-warningsto the nodejs executable OR - using
process.removeAllListeners('warning')
@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 process.emitWarning etc. which could make debugging things hard.)
Ref: https://nodejs.org/api/cli.html#node_no_warnings1 https://nodejs.org/api/cli.html#--no-warnings
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.