Closed JoostKersjes closed 1 year ago
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'
}
FWIW:
Environment Info:
Binaries:
Node: 18.16.0
Yarn: 1.22.19
npm: 9.5.1
npmPackages:
@storybook/addon-storysource: 7.1.0 => 7.1.0
@storybook/html: ^7.1.0 => 7.1.0
@storybook/html-webpack5: ^7.0.8 => 7.1.0
@storybook/preset-scss: ^1.0.3 => 1.0.3
@storybook/source-loader: 7.1.0 => 7.1.0
Duplicate of https://github.com/storybookjs/storybook/issues/22431. Please take a look at the following comment/workaround: https://github.com/storybookjs/storybook/issues/22431#issuecomment-1630086092
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