You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently got this error when trying to run npx ntl --autocomplete:
/[project path]/node_modules/inquirer-autocomplete-prompt-ipt/index.js:10
var Base = require('inquirer/lib/prompts/base');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /[project path]/node_modules/inquirer/lib/prompts/base.js from /[project path]/node_modules/inquirer-autocomplete-prompt-ipt/index.js not supported.
Instead change the require of base.js in /[project path]/node_modules/inquirer-autocomplete-prompt-ipt/index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/[project path]/node_modules/inquirer-autocomplete-prompt-ipt/index.js:10:12) {
code: 'ERR_REQUIRE_ESM'
}
I tried to debug without knowing much about the internals of ntl, and figured out:
It’s not a problem when I run the globally installed ntl, its only a problem when ntl is installed in my project folder.
It's not a problem when I add "inquirer": "8" to my package.json. Otherwise version 9 would be installed/used.
Hope this helps.
The text was updated successfully, but these errors were encountered:
PS: I got these errors without any updates to my package.json. So I believe there is some dependency in the chain which should be defined more precisely.
As this repo does not have a direct dependency to inquirer, it might be an issue of ipt (which uses inquirer internally) instead of ntl?
I recently got this error when trying to run
npx ntl --autocomplete
:I tried to debug without knowing much about the internals of
ntl
, and figured out:ntl
, its only a problem whenntl
is installed in my project folder."inquirer": "8"
to my package.json. Otherwise version 9 would be installed/used.Hope this helps.
The text was updated successfully, but these errors were encountered: