Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Storybook 7.1 with Yarn 1.22.19 #23518

Closed
Flobis opened this issue Jul 19, 2023 · 1 comment
Closed

[Bug]: Storybook 7.1 with Yarn 1.22.19 #23518

Flobis opened this issue Jul 19, 2023 · 1 comment

Comments

@Flobis
Copy link

Flobis commented Jul 19, 2023

Describe the bug

Bug occured after upgrading storybook from 6.5.16 to 7.1.0.

First yarn install succeeds, however next ones based on yarn.lock are failing.
(precision: yarn install will finish with warnings but modules seem to be broken).

Warning after first install
[1/4] Resolving packages...
[2/4] Fetching packages...
warning Pattern ["strip-ansi@^6.0.1"] is trying to unpack in the same destination "/.../.cache/yarn/v6/npm-strip-ansi-cjs-6.0.1-9e26c63d30f53443e9489495b2105d37b67a85d9-integrity/node_modules/strip-ansi-cjs" as pattern ["strip-ansi-cjs@npm:strip-ansi@^6.0.1"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["string-width@^4.1.0"] is trying to unpack in the same destination "/.../.cache/yarn/v6/npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["strip-ansi@^6.0.0"] is trying to unpack in the same destination "/.../.cache/yarn/v6/npm-strip-ansi-cjs-6.0.1-9e26c63d30f53443e9489495b2105d37b67a85d9-integrity/node_modules/strip-ansi-cjs" as pattern ["strip-ansi-cjs@npm:strip-ansi@^6.0.1"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["string-width@^4.2.0"] is trying to unpack in the same destination "/.../.cache/yarn/v6/npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
error during a simple CI command
yarn run v1.22.19
$ jest
Error [ERR_REQUIRE_ESM]: require() of ES Module /workspace/supermood/platform/design-system/node_modules/string-width/index.js from /workspace/supermood/platform/design-system/node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in /workspace/supermood/platform/design-system/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/workspace/supermood/platform/design-system/node_modules/cliui/build/index.cjs:291:21)
    at Object.<anonymous> (/workspace/supermood/platform/design-system/node_modules/yargs/build/index.cjs:1:60678)
    at Object.<anonymous> (/workspace/supermood/platform/design-system/node_modules/yargs/index.cjs:5:30)
    at _yargs (/workspace/supermood/platform/design-system/node_modules/jest-cli/build/run.js:30:39)
    at buildArgv (/workspace/supermood/platform/design-system/node_modules/jest-cli/build/run.js:143:26)
    at Object.run (/workspace/supermood/platform/design-system/node_modules/jest-cli/build/run.js:118:24)
    at Object.<anonymous> (/workspace/supermood/platform/design-system/node_modules/jest-cli/bin/jest.js:16:17)
    at Object.<anonymous> (/workspace/supermood/platform/design-system/node_modules/jest/bin/jest.js:12:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

We found an alternative solution using npm for now but we look forward to being able to use yarn again.

To Reproduce

No response

System

System:
    OS: Linux 6.0 Alpine Linux
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
  Binaries:
    Node: 18.16.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.5.1 - /usr/local/bin/npm
  npmPackages:
    @storybook/addon-actions: ^7.1.0 => 7.1.0 
    @storybook/addon-essentials: ^7.1.0 => 7.1.0 
    @storybook/addon-links: ^7.1.0 => 7.1.0 
    @storybook/web-components: ^7.1.0 => 7.1.0 
    @storybook/web-components-webpack5: ^7.1.0 => 7.1.0

Additional context

package.json
"dependencies": {
    "core-js": "^3.27.2",
    "lit": "^2.6.1",
    "ts-loader": "^9.4.2",
    "typescript": "^4.9.4",
    "webpack": "^5.74.0",
    "webpack-cli": "^5.0.1"
},
"devDependencies": {
    "@babel/core": "^7.22.9",
    "@babel/plugin-proposal-class-properties": "^7.18.6",
    "@babel/plugin-proposal-decorators": "^7.22.7",
    "@babel/plugin-transform-classes": "^7.22.6",
    "@babel/plugin-transform-for-of": "^7.22.5",
    "@babel/plugin-transform-modules-commonjs": "^7.22.5",
    "@babel/plugin-transform-regenerator": "^7.22.5",
    "@babel/plugin-transform-runtime": "^7.22.9",
    "@babel/plugin-transform-spread": "^7.22.5",
    "@babel/preset-env": "^7.22.9",
    "@babel/preset-typescript": "^7.22.5",
    "@storybook/addon-actions": "^7.1.0",
    "@storybook/addon-essentials": "^7.1.0",
    "@storybook/addon-links": "^7.1.0",
    "@storybook/web-components": "^7.1.0",
    "@storybook/web-components-webpack5": "^7.1.0",
    "@types/jest": "^29.4.0",
    "@types/node": "^18.11.18",
    "@typescript-eslint/eslint-plugin": "^6.1.0",
    "@typescript-eslint/parser": "^6.1.0",
    "babel-jest": "^29.6.1",
    "babel-loader": "^9.1.3",
    "clean-webpack-plugin": "^4.0.0",
    "eslint": "^8.36.0",
    "eslint-import-resolver-typescript": "^3.5.3",
    "eslint-plugin-import": "^2.27.5",
    "eslint-plugin-jest": "^27.2.1",
    "eslint-plugin-jest-formatting": "^3.1.0",
    "eslint-plugin-sort-keys-shorthand": "^2.2.0",
    "eslint-plugin-unicorn": "^48.0.0",
    "jest": "^29.4.1",
    "jest-environment-jsdom": "^29.4.1",
    "prompt": "^1.3.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "storybook": "^7.1.0",
    "stylelint": "^14.16.1",
    "stylelint-config-recommended": "^9.0.0",
    "stylelint-config-standard": "^29.0.0",
    "stylelint-config-styled-components": "^0.1.1",
    "stylelint-order": "^5.0.0",
    "stylelint-processor-styled-components": "^1.10.0",
    "ts-jest": "^29.1.1"
}
@valentinpalkovic
Copy link
Contributor

Duplicate of #22431

@valentinpalkovic valentinpalkovic marked this as a duplicate of #22431 Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants