When running a command that uses prompt, such as bit remove on node version v14.2.0 or above, it throws a warning.
bit remove your-componentYou'll get the following error:
➜ nm node --trace-warnings ~/teambit/bit/bin/bit.js remove bit.tmp1/foo-bar
are you sure you would like to proceed with this operation? (yes[y]/no[n])': (node:3829) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:823:11)
at Object.get (internal/modules/cjs/loader.js:837:5)
at Object.exports.setLevels (/Users/davidfirst/teambit/bit/node_modules/prompt/node_modules/winston/lib/winston/common.js:35:14)
at Object.<anonymous> (/Users/davidfirst/teambit/bit/node_modules/prompt/node_modules/winston/lib/winston.js:84:8)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (/Users/davidfirst/teambit/bit/node_modules/prompt/lib/prompt.js:14:15)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
should show a prompt message asking you to enter yes/no.
This is happening due to the prompt package that requires an old version of Winston. See https://github.com/flatiron/prompt/issues/199 for more info.
Sadly, this package is not maintained. An alternative could be https://www.npmjs.com/package/enquirer or forking prompt and upgrading its Winston version.
We already use inquirer for some stuff like interactive.. We should just use it instead and remove prompt
I'm new to bit and I found this really confusing as it occurred when I tried to export for the first time. It just looked like the export process had stalled.
Most helpful comment
We already use inquirer for some stuff like interactive.. We should just use it instead and remove prompt