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

Throw errors on storybook start if @babel/core or babel-loader are not installed as dependencies #7156

Closed
Yankovsky opened this issue Jun 20, 2019 · 8 comments

Comments

@Yankovsky
Copy link
Contributor

Is your feature request related to a problem? Please describe.
@babel/core and babel-loader are peer dependencies for storybook. People can miss storybook installation instructions or later delete these dependencies because they are not used in project directly. There are many issues because of it, e.g. #6967 and #7058

Describe the solution you'd like
I suggest adding some friendly reminder if @babel/core and babel-loader are not installed as dependencies in project. Consider create-react-app notification on different version of required dependency
http://s.csssr.ru/U02D248T6/2019-06-19-20-36-32-4babm_.jpg
We can run something similar on storybook start.

Describe alternatives you've considered
I know that there are notifications about missing peer dependencies but they are easy to ignore. http://s.csssr.ru/U02D248T6/2019-06-19-21-03-02-rec2i_.jpg
If we could turn them into errors it would be much better but I don't know if there is such flag in package.json or in npm install command.

Another approach would be to turn peerDependencies into real dependencies. What are implications of this approach?

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

@github-actions
Copy link
Contributor

Automention: Hey @Keraito, you've been tagged! Can you give a hand here?

@shilman
Copy link
Member

shilman commented Jun 20, 2019

Throwing errors up front is a good idea -- I imagine it can save people time. Can you create a PR for it? I don't think converting peerDependencies is a good idea but I can't recall the rationale for it. I'm sure @Hypnosphi remembers :)

@Yankovsky
Copy link
Contributor Author

Yankovsky commented Jun 20, 2019

I can work on this issue but first I want to understand why these dependencies are peer dependencies and I'll try to find a way to turn peer dependencies warning for package into errors.

@Hypnosphi
Copy link
Member

We need those as peer dependencies as long as we're going to support both babel 6 and babel 7 configs

@stale
Copy link

stale bot commented Jul 12, 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 Jul 12, 2019
@Yankovsky
Copy link
Contributor Author

Ok ok bot, I'll try to do something with that issue.

@stale stale bot removed the inactive label Jul 12, 2019
@stale
Copy link

stale bot commented Aug 2, 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 Aug 2, 2019
@stale
Copy link

stale bot commented Sep 1, 2019

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!

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

3 participants