-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Yarn 2: Support Yarn v2 "Berry" #9527
Comments
I will take a look at this one and try to make things work :) |
I was trigged to do it too, but I'm quite swamped; it'd be awesome if you could take this on! |
@igor-dv you were looking at |
Current situation about the compatibility with Yarn 2 (a.k.a Berry)@crubier created a repo explaining how to make SB works with Yarn Berry: https://github.com/crubier/yarnv2-storybook, the workaround is to:
Based on this repo and comments, multiple points need to be addressed to make SB works with Yarn Berry out of the box. There are my thoughts about that:
Here is a link of Introducing Yarn 2 article written by its main maintainer. Any feedback on all this is welcome! @crubier @igor-dv @ndelangen @shilman and anyone else :) |
@gaetanmaisse Thanks for this detailed explanation and for taking this on. You're awesome!! One extra bit of information: @tmeasday was recently talking to me about wanting to rewrite |
Are you talking about the usages of I just investigated a bit more and the answer to "What About "3. Update the base webpack config to include Plug'n'Play", it looks like Plug'n'Play will be supported out of the box by Webpack 5. But it is still in beta for now! In the next days, I will try to open a PR with as few changes as possible to make this works, this way we will have some code to discuss. 😉 |
LOL I guess rewriting that wouldn't help things then! 🙈 But I think the rewrite was meant to extend to at least some of Sounds like you don't need any of that to move forward. Thanks for leading the charge here! |
We can move the cache dir to That would solve these issues? |
Note that you don't need to check whether the user is running under Plug'n'Play, as the plugin already does and is a noop for other environments 🙂This is for example what Gatsby and Next do. |
With Storybook I still need to work on:
@ndelangen For the cache folder, I put it in |
Great job @gaetanmaisse !!! 💯 |
Love the efforts here! I ran into #7445 in yarn pnp. Not sure if someone caught this before. Looks like |
Hi. Thanks for your great efforts! Here's the error message:
Also I get this one (don't mind that): |
@kubijo |
@gaetanmaisse |
@gaetanmaisse great news, |
I might have been a little to quick as 35 didn't resolve ... So I thought that it's a typo, but maybe I just raced CDNs edit: nevermind, I think that just IDE didn't see it because it is running from a.35 |
Good golly!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-beta.1 containing PR #10613 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
Hi Storybook Team ! Here are the steps I followed: core-js is not found
Essential Addon not workingAfter adding There's also an error in the console:
Not sure what to do here as Warning in
|
For info, I digged a bit and created a repro case with some useful information. |
Fixed in #11753 which was released in v6.1.0-alpha.8 |
Thanks @merceyz for the quick answer ! Updating to
I've updated the repro case : https://github.com/jon301/storybook-yarn-berry-monorepo |
You need to |
Describe the bug
If you use Yarn v2, then you can't add Storybook to a simple Create React App, it crashes.
See yarnpkg/berry#592 (comment)
And the output here:
https://github.com/crubier/berry/commit/78acb633a0ad411ed173dae0a0037ab82fe346ad/checks?check_suite_id=407781418
To Reproduce
The following process is used in the workflow to reproduce this bug:
yarn dlx create-react-app my-cra && cd my-cra
to init a crat react appyarn dlx -p @storybook/cli sb init
to init storybook, but it fails hereyarn storybook
and that would be it.... ideally..Expected behavior
Success
Screenshots
System:
Additional context
Trying to make Storybook work with yarn v2
The text was updated successfully, but these errors were encountered: