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
/Users/fredin/src/alvalabs/alva-app/node_modules/cliui/build/index.cjs:291
const stringWidth = require('string-width');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/fredin/src/alvalabs/alva-app/node_modules/string-width/index.js from /Users/fredin/src/alvalabs/alva-app/node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in /Users/fredin/src/alvalabs/alva-app/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/Users/fredin/src/alvalabs/alva-app/node_modules/cliui/build/index.cjs:291:21)
at Object.<anonymous> (/Users/fredin/src/alvalabs/alva-app/node_modules/yargs/build/index.cjs:1:60678)
at Object.<anonymous> (/Users/fredin/src/alvalabs/alva-app/node_modules/yargs/index.cjs:5:30)
at Object.<anonymous> (/Users/fredin/src/alvalabs/alva-app/node_modules/@graphql-inspector/cli/cjs/index.js:5:41) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v18.16.1
Do you happen to have any tips on what I can do in this case?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Running the CLI as an npm script runs cjs as default despite the project running with type module.
Do you happen to have any tips on what I can do in this case?
Beta Was this translation helpful? Give feedback.
All reactions