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

Docs: add message that storybook creates node_modules in pnp #25988

Conversation

turtle601
Copy link
Contributor

@turtle601 turtle601 commented Feb 11, 2024

Closes #25987

What I did

'yarn storybook' creates node_modules/.cache in Yarn 2 PnP project

I think the development environment can cause confusion for those developing in pnp mode.

so, i add 'yarn storybook' creates node_modules/.cache in Yarn 2 PnP project in get-started/install.md files

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/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>

@jonniebigodes jonniebigodes self-assigned this Feb 11, 2024
@jonniebigodes jonniebigodes added documentation ci:docs Run the CI jobs for documentation checks only. labels Feb 11, 2024
@turtle601
Copy link
Contributor Author

@jonniebigodes I'm really looking forward to your feedback on that pr

Copy link
Contributor

@jonniebigodes jonniebigodes left a comment

Choose a reason for hiding this comment

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

@turtle601 appreciate you taking the time to put together this pull request and helping us improve our documentation by adding this small but rather important piece of information that is affecting you and can affect other users as well. I left a small item for you to look into when you have a moment.

Let me know of any questions you may have so that I can unblock you and get this merged.

Looking forward to hearing from you.

Have a fantastic day.

Stay safe

Comment on lines 77 to 82
<Callout variant="info">

If your repo is in PnP (Plug And Play) mode, node_modules may be installed when run.
because Storybook's cache directory is located in the node_modules folder, since it is normally not checked in via version control.

</Callout>
Copy link
Contributor

Choose a reason for hiding this comment

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

@turtle601 we have a bit of room for improvement here, If don't mind, can you remove this callout and instead add an entry in the troubleshooting section below as follows:

#### Yarn Plug'n'Play (PnP) support with Storybook

If you've enabled Storybook in a project running on a new version of Yarn with [Plug'n'Play](https://yarnpkg.com/features/pnp) (PnP) enabled, you may notice that it will generate `node_modules` with some additional files and folders. This is a known constraint as Storybook relies on some directories (e.g., `.cache`) to store cache files and other data to improve performance and faster builds. You can safely ignore these files and folders, adjusting your `.gitignore` file to exclude them from the version control you're using.

With this, we avoid having a double aside here, adding yet another break point in the documentation and make the issue more discoverable as you can see below:

yarn-plug-n-play-change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jonniebigodes Thank you so much for your feedback. :)

I saw your feedback and reflected it exactly.

I would appreciate it if you could check my PR one more time.

@jonniebigodes
Copy link
Contributor

@turtle601, no need to thank you whatsoever, glad to help you! I appreciate you addressing the feedback so quickly. I've checked, and all is good on my end. I'm going to merge this once the checklist clears.

Hope you have a fantastic day.

@jonniebigodes jonniebigodes merged commit b1b530f into storybookjs:next Feb 22, 2024
10 of 11 checks passed
@github-actions github-actions bot mentioned this pull request Feb 22, 2024
16 tasks
@turtle601 turtle601 deleted the docs/yarn-pnp-create-nodemodules-message branch February 23, 2024 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:docs Run the CI jobs for documentation checks only. documentation
Projects
None yet
2 participants