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

Ability to use start-storybook from global install #8760

Open
Buslowicz opened this issue Nov 8, 2019 · 7 comments
Open

Ability to use start-storybook from global install #8760

Buslowicz opened this issue Nov 8, 2019 · 7 comments

Comments

@Buslowicz
Copy link

Is your feature request related to a problem? Please describe.
Installing over 100MB of node_modules (over 1k packages) just for storybook to work... for each of the components I work on is a pain... Installing it once, globally should be enough

Describe the solution you'd like
I would like to be able to install storybook globally, like npm i -g @storybook/html @babel/core babel-loader

Describe alternatives you've considered
Can't think of anything else that would be reliable and easy to follow for less advanced users.

Are you able to assist bring the feature to reality?
Yes I can!

Additional context
Currently it is impossible to use storybook globally. It throws an error about not finding babel-loader though it's installed globally. Once installed babel-loader locally, it tries to find core-js locally. If this is installed manually as well, it cries about not being able to resolve @storybook/html (this is the one I was using).

I am aware that it's always safer to keep packages local and especially locking versions up, but downloading 100MB per smallest tiniest component is sometimes an overkill. I can help with developing that if I get a green light and some brief intro where to find the code and if it's something that needs to be done per client (html/react/angular/vue etc) or is it a shared functionality.

@Buslowicz
Copy link
Author

I guess this wont be done any time soon?

@stale stale bot removed the inactive label Nov 29, 2019
@storybookjs storybookjs deleted a comment from stale bot Nov 30, 2019
@shilman
Copy link
Member

shilman commented Nov 30, 2019

@ndelangen do you have thoughts about this?

@stale
Copy link

stale bot commented Dec 21, 2019

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. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Dec 21, 2019
@stale
Copy link

stale bot commented Jan 20, 2020

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

@stale stale bot closed this as completed Jan 20, 2020
@codynova
Copy link

I work in an enterprise environment, and this is a feature we'd love to have. I've already done some legwork in testing a global CLI and install of Storybook dependencies in this repo. I've tested multiple different config formats - as can be seen in the three branches in the repo - but always run into errors that seem related to node_module resolution. I would also be willing to contribute to the development of this feature, as the per-project Storybook installation is not ideal for our work environment.

@shilman shilman reopened this Nov 1, 2020
@stale stale bot removed the inactive label Nov 1, 2020
@stale stale bot removed the inactive label Nov 1, 2020
@shilman shilman added this to the 6.2 perf milestone Nov 1, 2020
@shilman shilman added the PN label Nov 1, 2020
@ndelangen
Copy link
Member

Here's an idea:

  • user installs @storybook/cli globally

  • user installs @storybook/{framework} globally

  • user defines framework: 'react' in main.js

  • user can run sb start
    storybook can work out what framework bin to load (from global

  • allow users to install all required global dependencies using something like: npx sb install-global react
    (let's reserve the install command for later use)


work needed to be done:

  • fix the inability to run when installed globally for both packages

  • add sb start and make this lookup the framework and start the correct start-storybook bin.

  • add the sb install-global command

@stale
Copy link

stale bot commented Dec 25, 2020

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. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Dec 25, 2020
@shilman shilman modified the milestones: 6.2 perf, 7.0 frameworks May 20, 2022
@stale stale bot removed inactive labels May 20, 2022
@shilman shilman removed the PN label Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants