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 CLI doesn't work with Yarn Modern Workspaces #21345

Closed
Methuselah96 opened this issue Mar 2, 2023 · 3 comments · Fixed by #21356
Closed

[Bug]: Storybook CLI doesn't work with Yarn Modern Workspaces #21345

Methuselah96 opened this issue Mar 2, 2023 · 3 comments · Fixed by #21356
Assignees
Labels

Comments

@Methuselah96
Copy link
Contributor

Describe the bug

When trying to run storybook init, storybook upgrade, or storybook automigrate in a Yarn Modern monorepo that uses workspaces I get an error like this:

> npx storybook@next init

 storybook init - the simplest way to add a Storybook to your project. 

(node:21880) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
 • Detecting project type. ✓
    Detected webpack project. Setting builder to webpack
 • Adding Storybook support to your "Webpack React" app
Unknown Syntax Error: Unsupported option name ("-W").

$ yarn add [--json] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] [--mode #0] ...
An error occurred while installing dependencies.

To Reproduce

Clone https://github.com/Methuselah96/StorybookCLIYarnWorkspaces and run npx storybook@next init.

System

Environment Info:

  System:
    OS: Windows 10 10.0.22621
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  Binaries:
    Node: 18.12.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1265.0), Chromium (110.0.1587.57)

Additional context

No response

@valentinpalkovic
Copy link
Contributor

@ndelangen Might have something to do with your recent changes?

@ndelangen
Copy link
Member

ndelangen commented Mar 2, 2023

Yes, that would appear so.

I'll investigate

Looks like yarn doesn't need to -W flag anymore at all, I'll remove it.

@shilman
Copy link
Member

shilman commented Mar 2, 2023

ZOMG!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.60 containing PR #21356 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb@next upgrade --prerelease

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants