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

Addons require react peer dependencies for Vue Storybook #1751

Closed
sky790312 opened this issue Aug 28, 2017 · 7 comments
Closed

Addons require react peer dependencies for Vue Storybook #1751

sky790312 opened this issue Aug 28, 2017 · 7 comments

Comments

@sky790312
Copy link

sky790312 commented Aug 28, 2017

I use vue with stoyrbook and want to add more addons like centered, noted..etc.
I follow the step to install:
https://www.npmjs.com/package/@storybook/vue
Then I get default addons 'actions' and 'links' and example.
But when I want to install other addons, It fails without react dependency

yarn add @storybook/addon-centered --dev
yarn add v0.16.0
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning Unmet peer dependency "react@*".
error An unexpected error occurred, please open a bug report with the information provided in "/project path/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

https://github.com/storybooks/storybook/blob/afeebe035814193a9d970b6b613236b08eda2519/addons/centered/README.md

How to resolve the dependency's problem?

@danielduan danielduan changed the title vue add Addons must depended on react dependency !? Addons require react peer dependencies for Vue Storybook Aug 28, 2017
@danielduan
Copy link
Member

You can install the react package in the root directory of your project where @storybook/vue is installed.

I wonder if we should also include that in the documentation and cli to automatically install react for the other platforms as well.

@Hypnosphi
Copy link
Member

Hypnosphi commented Aug 30, 2017

@storybook/vue has React as dependency, but maybe we should change it to peer and add React as a direct devDpendency of the app in CLI (because it will be used from app package)

@Hypnosphi Hypnosphi added the cli label Aug 30, 2017
@Hypnosphi Hypnosphi self-assigned this Aug 31, 2017
@Hypnosphi
Copy link
Member

Related: yarnpkg/yarn#2688

@Hypnosphi
Copy link
Member

Hypnosphi commented Aug 31, 2017

@sky790312 By the way, it looks like you're using an outdated version of yarn. Unmet peer dep should be just a warning, not an error

@Hypnosphi
Copy link
Member

but maybe we should change it to peer and add React as a direct devDpendency of the app in CLI (because it will be used from app package)

Actually it isn't used in stories code, so it should be left as is.

@Hypnosphi Hypnosphi removed their assignment Sep 9, 2017
@stale
Copy link

stale bot commented Nov 2, 2017

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!

@stale stale bot added the inactive label Nov 2, 2017
@stale
Copy link

stale bot commented Nov 17, 2017

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 Nov 17, 2017
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