Search code examples
node.jscommand-line-interfaceyargs

yargs is throwing a ExperimentalWarning


I am writing a node.js CLI program and for some reason when I just include yargs like

const yargs = require("yargs");

I get a warning:

(node:30562) ExperimentalWarning: Conditional exports is an experimental feature. This feature could change at any time

I'm not sure why and it's pretty annoying to see every time I test my application. Any idea why this warning is appearing and how to get rid of it?


Solution

  • Running into the same thing and asking over here https://github.com/yargs/yargs/issues/1763

    EDIT: Update your node version. It is fixed when you upgrade. I verified on node --version v14.11.0