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
import { confirm } from '@inquirer/prompts';
const confirmation = await confirm({ message: 'Are you sure?' });
I get an exception
/.../node_modules/wrap-ansi/index.js:2
const stringWidth = require('string-width');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /.../node_modules/string-width/index.js from /.../node_modules/wrap-ansi/index.js not supported.
Instead change the require of /.../node_modules/string-width/index.js in /.../node_modules/wrap-ansi/index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/.../node_modules/wrap-ansi/index.js:2:21) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v21.1.0
The text was updated successfully, but these errors were encountered:
Hey @vhpoet, could you provide some more informations. I don't see how a new version of string-width would've gotten in your codebase through Inquirer (reviewing bumps and changes, I don't see changes around those packages versions who're pinned to cjs versions...)
The easiest would be to run either of those commands and report the output:
npm ls string-width
npm ls wrap-ansi
# or
yarn why string-width
yarn why wrap-ansi
I'm on
"@inquirer/prompts": "^4.1.0"
.My code is
I get an exception
The text was updated successfully, but these errors were encountered: