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
My (Vue 3 & Vite) project has Storybook and Cypress installed. Renovate created an update request for Storybook to go from 7.0.27 to 7.1.0. Installing the project dependencies throws an error. Any pipeline job that uses a Cypress CLI command also fails. Here is an example of the error:
yarn run v1.22.19
$ cypress open --component
/path/to/project/root/node_modules/cli-table3/src/utils.js:1
const stringWidth = require('string-width');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/project/root/node_modules/string-width/index.js from /path/to/project/root/node_modules/cli-table3/src/utils.js not supported.
Instead change the require of index.js in /path/to/project/root/node_modules/cli-table3/src/utils.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/path/to/project/root/node_modules/cli-table3/src/utils.js:1:21)
at Object.<anonymous> (/path/to/project/root/node_modules/cli-table3/src/table.js:2:15)
at Object.<anonymous> (/path/to/project/root/node_modules/cli-table3/index.js:1:18)
at Object.<anonymous> (/path/to/project/root/node_modules/cypress/lib/tasks/cache.js:10:15)
at Object.<anonymous> (/path/to/project/root/node_modules/cypress/lib/cli.js:14:15)
at Object.<anonymous> (/path/to/project/root/node_modules/cypress/bin/cypress:3:1) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v20.4.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I don't think this has anything to do with Cypress. I'm getting the same error when running either yarn storybook dev or yarn storybook build locally:
/project/node_modules/cli-table3/src/utils.js:1
const stringWidth = require('string-width');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /project/node_modules/string-width/index.js from /project/node_modules/cli-table3/src/utils.js not supported.
Instead change the require of index.js in /project/node_modules/cli-table3/src/utils.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/project/node_modules/cli-table3/src/utils.js:1:21)
at Object.<anonymous> (/project/node_modules/cli-table3/src/table.js:2:15)
at Object.<anonymous> (/project/node_modules/cli-table3/index.js:1:18)
at Object.<anonymous> (/project/node_modules/@storybook/core-server/dist/index.js:113:7796)
at Object.<anonymous> (/project/node_modules/@storybook/cli/dist/generate.js:11:4494)
at Object.<anonymous> (/project/node_modules/@storybook/cli/bin/index.js:9:1)
at Object.<anonymous> (/project/node_modules/storybook/index.js:3:1) {
code: 'ERR_REQUIRE_ESM'
}
Describe the bug
My (Vue 3 & Vite) project has Storybook and Cypress installed. Renovate created an update request for Storybook to go from
7.0.27
to7.1.0
. Installing the project dependencies throws an error. Any pipeline job that uses a Cypress CLI command also fails. Here is an example of the error:To Reproduce
npx storybook@next sandbox
Vue3 Vite (TS)
vue3-vite/default-ts
)cd vue3-vite/default-ts
yarn install
yarn add -D cypress@latest
System
Additional context
No response
The text was updated successfully, but these errors were encountered: