cli icon indicating copy to clipboard operation
cli copied to clipboard

Node experimental feature warning leaking to CLI

Open danisztls opened this issue 3 years ago • 0 comments

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

danisztls avatar May 13 '22 18:05 danisztls

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=1 OR
  • by passing the --no-warnings to 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

tinfoil-knight avatar Aug 23 '22 07:08 tinfoil-knight

oh, if it's a node issue then I don't think we need to do anything 😢

minivan avatar Aug 23 '22 14:08 minivan

This is fixed with #4998

Once the next release is published it will go away.

danez avatar Aug 26 '22 11:08 danez