-
-
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
Explain the -g pattern in documentation is for generating only, not to run storybook itself #916
Comments
Hi @TheJaredWilcurt. As far as I know, there are no global requirements for Storybook. https://storybooks.github.io/docs/react-storybook/basics/slow-start-guide Please let me know if that answers your concern! |
@shilman I think he might be referring to these instructions: |
Ok @avaly @TheJaredWilcurt. Given that there is documentation that describes how to set things up by hand without any global requirement, does that address your concern? And if not, why not? If you think it can be made better, please feel free to submit a PR to improve the docs! |
You could just add in a link to the slow guide next to the other, far easier to find, instructions that said: "If you want instructions on using Storybook that don't require polluting your PATH, click here." Feel free to pretty up that language, I'm no wordsmith. |
We're working on better documentation, thanks for the notification we should improve on this front. I agree, less global installs is better. However to get a project setup from scratch it's very common to have some sort of generator you need to install globally. This is what |
-g
anti-pattern
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. We do try to do some housekeeping every once in a while so inactive issues will get closed after 90 days. Thanks! |
done. |
It's widely considered to be an anti-pattern to request that people globally install your Node Module. You shouldn't have to have Grunt, Bower, Webpack, Rollup, Storybook, etc, etc, etc, added to your system's global PATH.
Further, it can cause version issues. If the project I am using was written expecting an older version of
X
, but the newer, globally installed, version doesn't work with the project. Had the project just listedX
in thedevDependencies
and accessed it via anpm run scriptName
then when I rannpm install
I'd have the correct version downloaded locally, and when I run it vianpm run whatever
it will use the correct version.There should be documentation showing how to get
start-storybook
/build-storybook
to run locally without adding anything to the PATH.In order to run someone else's project, the expectation should be just to run
npm install
andnpm start
. If you have to globally install something, you're adding barriers of entry to getting more people to contribute.The text was updated successfully, but these errors were encountered: