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

CLI: Corrected Next.js createScript for pnpm. #30304

Conversation

zhyd1997
Copy link
Contributor

@zhyd1997 zhyd1997 commented Jan 18, 2025

Closes #30291

What I did

pnpm create next-app@^14 . --typescript --use-pnpm --eslint --tailwind --no-app --import-alias="@/*" --src-dir
Screenshot 2025-01-18 at 21 40 29

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!

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 298 B 1.11 0%
initSize 131 MB 131 MB 412 B 1.2 0%
diffSize 53 MB 53 MB 114 B 1.25 0%
buildSize 7.19 MB 7.19 MB 0 B 0.82 0%
buildSbAddonsSize 1.85 MB 1.85 MB 0 B -0.82 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.87 MB 1.87 MB 0 B 0.82 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.91 MB 3.91 MB 0 B 0.82 0%
buildPreviewSize 3.28 MB 3.28 MB 0 B 0.82 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 26.1s 24s -2s -176ms 1.44 🔰-9.1%
generateTime 18.6s 19.8s 1.1s -0.64 5.9%
initTime 12.5s 14.4s 1.8s -0.12 13.2%
buildTime 10.2s 8.7s -1s -469ms -0.68 -16.8%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 4.6s 5.3s 657ms 0.94 12.3%
devManagerResponsive 3.3s 3.8s 430ms 1.22 11.3%
devManagerHeaderVisible 519ms 641ms 122ms 1.16 19%
devManagerIndexVisible 527ms 672ms 145ms 0.78 21.6%
devStoryVisibleUncached 1.8s 1s -785ms -3.25 🔰-72%
devStoryVisible 590ms 673ms 83ms 1.14 12.3%
devAutodocsVisible 508ms 624ms 116ms 1.93 🔺18.6%
devMDXVisible 494ms 569ms 75ms 0.65 13.2%
buildManagerHeaderVisible 552ms 720ms 168ms 3.36 🔺23.3%
buildManagerIndexVisible 654ms 737ms 83ms 1.78 🔺11.3%
buildStoryVisible 538ms 697ms 159ms 3.53 🔺22.8%
buildAutodocsVisible 439ms 517ms 78ms 0.87 15.1%
buildMDXVisible 420ms 533ms 113ms 2.15 🔺21.2%

Greptile Summary

Fixed incorrect version specifier format in Next.js project creation command for pnpm, resolving a 404 error during project initialization.

  • Changed version specifier from next-app^14 to next-app@^14 in code/lib/create-storybook/src/scaffold-new-project.ts
  • Fixed pnpm trying to fetch non-existent package 'create-next-app14'
  • Aligned pnpm command syntax with npm/yarn version specifier format

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

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.

LGTM

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

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.

LGTM

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

Copy link

nx-cloud bot commented Jan 18, 2025

View your CI Pipeline Execution ↗ for commit 6c6203b.

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

☁️ Nx Cloud last updated this comment at 2025-01-18 13:51:53 UTC

@zhyd1997 zhyd1997 changed the title fix: corrected nextjs createScript for pnpm. create-storybook: corrected nextjs createScript for pnpm. Jan 21, 2025
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.

LGTM

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

@valentinpalkovic valentinpalkovic added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Jan 23, 2025
@storybook-pr-benchmarking
Copy link

Package Benchmarks

Commit: 6c6203b, ran on 23 January 2025 at 11:22:32 UTC

The following packages have significant changes to their size or dependencies:

@storybook/react-native-web-vite

Before After Difference
Dependency count 137 114 🎉 -23 🎉
Self size 43 KB 43 KB 🎉 -250 B 🎉
Dependency size 19.89 MB 18.25 MB 🎉 -1.64 MB 🎉
Bundle Size Analyzer Link Link

@valentinpalkovic valentinpalkovic changed the title create-storybook: corrected nextjs createScript for pnpm. CLI: Corrected Next.js createScript for pnpm. Jan 23, 2025
@valentinpalkovic valentinpalkovic changed the title CLI: Corrected Next.js createScript for pnpm. CLI: Corrected Next.js createScript for pnpm. Jan 23, 2025
@valentinpalkovic valentinpalkovic merged commit 3d390e2 into storybookjs:next Jan 23, 2025
67 of 78 checks passed
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.

LGTM

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

@github-actions github-actions bot mentioned this pull request Jan 23, 2025
7 tasks
@zhyd1997 zhyd1997 deleted the fix/issue-30291-zhyd1997-1737207908875 branch January 23, 2025 11:46
@github-actions github-actions bot mentioned this pull request Jan 24, 2025
5 tasks
valentinpalkovic added a commit that referenced this pull request Jan 27, 2025
…207908875

CLI: Corrected Next.js createScript for pnpm.
(cherry picked from commit 3d390e2)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ci:normal cli nextjs patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Initial Next.JS template failed
2 participants