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

Build: Added additional react resolutions for next 15 or above sandboxes. #30372

Conversation

zhyd1997
Copy link
Contributor

@zhyd1997 zhyd1997 commented Jan 24, 2025

Closes #30302

What I did

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Screenshot 2025-01-24 at 21 19 11 Screenshot 2025-01-24 at 21 20 58 Screenshot 2025-01-24 at 21 21 28

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.9 MB 77.9 MB 0 B 1.37 0%
initSize 131 MB 131 MB 0 B 0.99 0%
diffSize 53 MB 53 MB 0 B -0.33 0%
buildSize 7.17 MB 7.17 MB 0 B -1.22 0%
buildSbAddonsSize 1.85 MB 1.85 MB 0 B 1.22 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB 0 B -1.22 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.91 MB 3.91 MB 0 B -1.22 0%
buildPreviewSize 3.26 MB 3.26 MB 0 B -1.22 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 25.7s 13.8s -11s -881ms -0.18 -85.5%
generateTime 17.4s 18.9s 1.5s -1.07 8.1%
initTime 11.5s 12.5s 932ms -0.98 7.5%
buildTime 8.5s 9.7s 1.1s 0.13 11.6%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5s 5.9s 895ms 1.9 🔺15.1%
devManagerResponsive 3.7s 4.1s 411ms 1.83 🔺9.9%
devManagerHeaderVisible 771ms 923ms 152ms 3.83 🔺16.5%
devManagerIndexVisible 852ms 990ms 138ms 3.38 🔺13.9%
devStoryVisibleUncached 2.6s 4.4s 1.8s 8.14 🔺40.2%
devStoryVisible 853ms 988ms 135ms 3.82 🔺13.7%
devAutodocsVisible 688ms 804ms 116ms 2.59 🔺14.4%
devMDXVisible 705ms 792ms 87ms 3.2 🔺11%
buildManagerHeaderVisible 713ms 748ms 35ms 1.44 4.7%
buildManagerIndexVisible 848ms 892ms 44ms 1.93 4.9%
buildStoryVisible 691ms 728ms 37ms 1.47 🔺5.1%
buildAutodocsVisible 776ms 601ms -175ms 0.87 -29.1%
buildMDXVisible 624ms 641ms 17ms 1.85 2.7%

Greptile Summary

Based on the provided information, I'll create a concise summary of the pull request that addresses the Next.js sandbox creation issue:

Modified Yarn resolutions to fix Next.js 15+ sandbox creation failures by adding React 19 peer dependency workarounds.

  • Added conditional React 19 resolutions in scripts/utils/yarn.ts for Next.js 15+ sandboxes
  • Fixed INCOMPATIBLE_PEER_DEPENDENCY errors when creating Next.js sandboxes
  • Resolved dependency conflicts between @storybook/test and @storybook/react
  • Addressed peer dependency issues with @storybook/addon-essentials
  • Added workaround for webpack peer dependency requirement in @storybook/nextjs

💡 (2/5) Greptile learns from your feedback when you react with 👍/👎!

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

scripts/utils/yarn.ts Show resolved Hide resolved
Copy link

nx-cloud bot commented Jan 24, 2025

View your CI Pipeline Execution ↗ for commit cd66ed5.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 52s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-29 15:24:33 UTC

@valentinpalkovic valentinpalkovic self-assigned this Jan 27, 2025
@valentinpalkovic valentinpalkovic added nextjs build Internal-facing build tooling & test updates labels Jan 27, 2025
@valentinpalkovic valentinpalkovic changed the title fix: added additional react resolutions for next 15 or above sandboxes. Build: Added additional react resolutions for next 15 or above sandboxes. Jan 29, 2025
@valentinpalkovic valentinpalkovic merged commit db633c6 into storybookjs:next Jan 29, 2025
56 of 59 checks passed
@github-actions github-actions bot mentioned this pull request Jan 29, 2025
11 tasks
@zhyd1997 zhyd1997 deleted the fix/sandbox-yadong-issue-30302-1737722980988 branch January 29, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates ci:normal nextjs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: create Nextjs sandbox failed.
2 participants