question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why is react stated as peerDependency when using @storybook/vue?

See original GitHub issue

I’m using the latest beta version right now (37), and use rush + pnpm for our mono-repo. I can’t find in the docs what the reason is that react is stated as peerDependency for @storybook/vue, and some plugins, while react is only used internally by Storybook. An explanation would be great, as right now, I change them to normal dependency in pnpmfile, and all still works.

As a side-note: I know it’s not always easy specifying dependencies, and peerDependencies are somewhat over-used out there, while they should only be used when a package really is a plugin/addon, or is suppose to work together with the actual source code and it’s framework.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
tooppaaacommented, Aug 19, 2020

Yes, however this can be updated.

Idea was to move all CLI’s to a single script, all frameworks relied on the same set of addons, then we added essentials and finally starting to migrate popular frameworks using this superset.

There are still some frameworks that are using addon-actions the old way. Instead of excluding this addon from migrated frameworks, we leaved it as is.

Work must go on 🧑‍🎤

2reactions
marmaxcommented, Aug 17, 2020

While using Vue.js (CLI) or Nuxt.js, I don’t want to get bothered by any dependency which doesn’t fit to my (selected) stack…

warning " > @storybook/addon-essentials@6.0.12" has unmet peer dependency "react@^16.8.0".
warning " > @storybook/addon-essentials@6.0.12" has unmet peer dependency "react-dom@*".
warning " > @storybook/addon-essentials@6.0.12" has unmet peer dependency "react-is@^16.8.0".
warning "@storybook/addon-essentials > @storybook/addon-backgrounds@6.0.12" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-essentials > @storybook/addon-controls@6.0.12" has unmet peer dependency "react@*".
warning "@storybook/addon-essentials > @storybook/addon-controls@6.0.12" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-essentials > @storybook/addon-docs@6.0.12" has unmet peer dependency "babel-loader@^8.0.0".
warning "@storybook/addon-essentials > @storybook/addon-docs@6.0.12" has unmet peer dependency "react@>=16.3.0".
warning "@storybook/addon-essentials > @storybook/addon-docs@6.0.12" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-essentials > @storybook/addon-docs@6.0.12" has unmet peer dependency "react-is@^16.8.0".
warning "@storybook/addon-essentials > @storybook/addon-toolbars@6.0.12" has unmet peer dependency "react@*".
warning "@storybook/addon-essentials > @storybook/addon-toolbars@6.0.12" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-essentials > @storybook/addon-viewport@6.0.12" has unmet peer dependency "react@*".
warning "@storybook/addon-essentials > @storybook/addon-viewport@6.0.12" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-essentials > @storybook/addon-docs > @mdx-js/react@1.6.16" has unmet peer dependency "react@^16.13.1".
warning "@storybook/addon-essentials > @storybook/addon-docs > @storybook/source-loader@6.0.12" has unmet peer dependency "react@*".
warning "@storybook/addon-essentials > @storybook/addon-docs > @storybook/source-loader@6.0.12" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-essentials > @storybook/addon-docs > react-element-to-jsx-string@14.3.1" has unmet peer dependency "react@^0.14.8 || ^15.0.1 || ^16.0.0".
warning "@storybook/addon-essentials > @storybook/addon-docs > react-element-to-jsx-string@14.3.1" has unmet peer dependency "react-dom@^0.14.8 || ^15.0.1 || ^16.0.0".
Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding Peer Dependencies in JavaScript
When to use peerDependencies? Peer dependencies really come into play when you're developing code that will be used by others, ...
Read more >
Using StorybookJS in a component library package with ...
The package. json is using react and react-dom as peer dependencies because I only want to ship code for components only. This package...
Read more >
@storybook/react | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Storybook for Vue
You may have tried to use our quick start guide to setup your project for Storybook. ... Add @storybook/vue; Add vue and babel-core;...
Read more >
storybook/vue
Vite: Make vite a peer dependency, update plugins #20281 ... Build: compile detection was using a non-conforming package, causing cache to miss always....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found