-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
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 whenntlis 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.
Metadata
Metadata
Assignees
Labels
No labels