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

Can't install storybook@6.4.0-beta.3 due to peer dependencies conflict #16210

Closed
alvis opened this issue Oct 1, 2021 · 4 comments
Closed

Can't install storybook@6.4.0-beta.3 due to peer dependencies conflict #16210

alvis opened this issue Oct 1, 2021 · 4 comments

Comments

@alvis
Copy link

alvis commented Oct 1, 2021

The Issue

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: <my package>
npm ERR! Found: vue@2.6.14
npm ERR! node_modules/vue
npm ERR!   peer vue@"^2.6.10 || ^3.0.0" from @storybook/addon-docs@6.4.0-beta.3
npm ERR!   node_modules/@storybook/addon-docs
npm ERR!     dev @storybook/addon-docs@"next" from <my package>
npm ERR!     packages/components
npm ERR!       <my package>
npm ERR!       node_modules/<my package>
npm ERR!         workspace packages/components from the root project
npm ERR!   peer vue@"^2.6.8" from @storybook/vue@6.4.0-beta.3
npm ERR!   node_modules/@storybook/vue
npm ERR!     peer @storybook/vue@"6.4.0-beta.3" from @storybook/addon-docs@6.4.0-beta.3
npm ERR!     node_modules/@storybook/addon-docs
npm ERR!       dev @storybook/addon-docs@"next" from <my package>
npm ERR!       packages/components
npm ERR!         <my package>
npm ERR!         node_modules/<my package>
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^3.0.0" from @storybook/vue3@6.4.0-beta.3
npm ERR! node_modules/@storybook/vue3
npm ERR!   peer @storybook/vue3@"6.4.0-beta.3" from @storybook/addon-docs@6.4.0-beta.3
npm ERR!   node_modules/@storybook/addon-docs
npm ERR!     dev @storybook/addon-docs@"next" from <my package>@0.0.0
npm ERR!     packages/components
npm ERR!       <my package>@0.0.0
npm ERR!       node_modules/<my package>
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

The root cause

You can't have both @storybook/vue & stoybook/vue3 as peer dependencies in @storybook/addon-docs

"@storybook/vue": "6.4.0-beta.3",
"@storybook/vue3": "6.4.0-beta.3",

@shilman
Copy link
Member

shilman commented Oct 2, 2021

If you look a few lines below they are both optional:

https://github.com/storybookjs/storybook/blob/next/addons/docs/package.json#L169-L174

We will address this in a more clean way in the future, but for now, you should be able to use yarn OR run npm with the --force flag as a workaround. cc @tmeasday

@nVitius
Copy link
Contributor

nVitius commented Oct 13, 2021

@shilman can you share what the plans, if any, are for addressing this?

@shilman
Copy link
Member

shilman commented Oct 13, 2021

Yes. We'll remove the dependencies altogether in a few different ways. Stories will render inline using a new mechanism that's already implemented in 6.4 that's hidden behind a feature flag. Component metadata like argTypes will come from a separate server that's currently being prototyped for 6.5. And whatever's left over -- source snippets?? -- will be provided by dependency injection

@shilman
Copy link
Member

shilman commented Mar 14, 2022

Ooh-la-la!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.48 containing PR #17697 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Mar 14, 2022
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