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.

Unmet peer dependency warnings for @storybook/addon-storyshots@6.2.9 when running `yarn install`

See original GitHub issue

When running yarn install we are getting unmet peer dependency warnings:

 warning "workspace-aggregator-... > ... > @storybook/addon-storyshots@6.2.9" has unmet peer dependency "svelte@*".
 warning "workspace-aggregator-... > ... > @storybook/addon-storyshots@6.2.9" has unmet peer dependency "vue-jest@*".
 warning "workspace-aggregator-... > ... > @storybook/addon-storyshots > react-test-renderer@17.0.2" has incorrect peer dependency "react@17.0.2".

We are using the following devDependencies in our repo:

        "storybook": "^6.2.8",
        "@storybook/addon-a11y": "^6.2.8",
        "@storybook/addon-essentials": "^6.2.8",
        "@storybook/addon-jest": "^6.2.8",
        "@storybook/addon-links": "^6.2.8",
        "@storybook/addon-storyshots": "^6.2.8",
        "@storybook/react": "^6.2.8"

as well as dependencies:

        "react": "^16.13.1",
        "react-dom": "^16.13.1"

and also added "react-test-renderer": "^16.13.1" to try resolve one of the warnings, which did not help. Also, it is weird that it still asks forreact-test-renderer@17.0.2" and "react@17.0.2", while "react-test-renderer": "^16.13.1" and "react": "^16.13.1" have been clearly met.

Surely, the option is to add all the above as devDependencies of out package.json, but I do not think it’s a viable option. There are similar issues that were discussed in yarn community https://github.com/yarnpkg/yarn/issues/5347

Would appreciate your advice on this, thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
merceyzcommented, May 14, 2021

Do you know if npm7 handles this use case this way, too?

I tested npm@7.13.0 and it doesn’t even install preact-render-to-string

npm install @storybook/addon-storyshots@6.3.0-alpha.21
ls -R node_modules/ | grep preact-render-to-string

cc @isaacs

my change could still be merged to prevent the warning, right?

preact-render-to-string isn’t a peer dependency so it wouldn’t help

3reactions
merceyzcommented, May 6, 2021

@merceyz any chance you can weigh in on this one?

@shilman - https://github.com/storybookjs/storybook/issues/14758#issuecomment-829267290

Sure, I opened https://github.com/storybookjs/storybook/pull/14835 to deal with the dependencies that Storybook controls, not much can be done about the range specified by react-test-renderer here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What does 'has unmet peer dependency' mean when ...
To resolve this warning you should run yarn add <package> for each <package> that is complained about. Below is an example. Original output...
Read more >
check-peer-dependencies | Yarn - Package Manager
It checks if you have installed a package that meets the required peer dependency versions. If any peer dependencies are unmet, it will...
Read more >
styled-components@5.3.5" has unmet peer dependency ...
Simply installing Storybook HTML with the recommended method causes a ton of dependency warnings to be emitted every time the package manager (Yarn)...
Read more >
Error npm UNMET PEER DEPENDENCY warning - Edureka
I'm on Windows 10, with Node 5.6.0 and npm 3.6.0. I'm trying to install angular- ... do I resolve this to get AngularJS...
Read more >
[package] has unmet peer dependency - Notes and Anecdotes
I'll sometime see a warning telling me that a dependency (that I have installed) has an unmet peer dependency. I don't know what...
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