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.

Yarn 2 compatibility: undeclared peerDependencies (non-breaking)

See original GitHub issue

Describe the bug

yarn install (Yarn 2 - Berry) produces this output. These are warnings only, not breaking:

➤ YN0000: ┌ Resolution step
...
➤ YN0002: │ @storybook/aurelia@npm:6.2.9 [61d6c] doesn't provide typescript@* requested by ts-loader@npm:6.2.2
➤ YN0002: │ @storybook/core@npm:6.2.9 [14add] doesn't provide webpack@* requested by @storybook/core-client@npm:6.2.9
➤ YN0002: │ @storybook/core@npm:6.2.9 [61d6c] doesn't provide webpack@* requested by @storybook/core-client@npm:6.2.9
➤ YN0002: │ @storybook/html@npm:6.2.9 [61d6c] doesn't provide webpack@^4.0.0 || ^5.0.0 requested by html-loader@npm:1.3.2
➤ YN0002: │ @storybook/core@npm:6.2.9 [02201] doesn't provide webpack@* requested by @storybook/core-client@npm:6.2.9
➤ YN0002: │ @storybook/marionette@npm:6.2.9 [61d6c] doesn't provide webpack@^4.0.0 || ^5.0.0 requested by html-loader@npm:1.3.2
➤ YN0002: │ @storybook/core@npm:6.2.9 [bf9dd] doesn't provide webpack@* requested by @storybook/core-client@npm:6.2.9
➤ YN0002: │ vue-docgen-api@npm:4.38.1 doesn't provide vue@3.0.11 requested by @vue/compiler-sfc@npm:3.0.11
➤ YN0002: │ @storybook/vue@npm:6.2.9 [61d6c] doesn't provide typescript@* requested by ts-loader@npm:8.2.0
➤ YN0002: │ @storybook/core@npm:6.2.9 [dae8b] doesn't provide webpack@* requested by @storybook/core-client@npm:6.2.9
➤ YN0002: │ @storybook/vue3@npm:6.2.9 [61d6c] doesn't provide typescript@* requested by ts-loader@npm:8.2.0
➤ YN0002: │ @storybook/core@npm:6.2.9 [9187c] doesn't provide webpack@* requested by @storybook/core-client@npm:6.2.9
...

To Reproduce

In a temporary folder…

yarn set version berry
yarn init
yarn add -D @storybook/core @storybook/aurelia @storybook/html @storybook/marionette @storybook/vue @storybook/vue3

Check output for YN0002 warnings, skip those concerning <folder name>@workspace Thanks to @spiltcoffee https://github.com/storybookjs/storybook/issues/11397#issuecomment-830063886 https://github.com/storybookjs/storybook/issues/11397#issuecomment-830076079

Temporary fix

Create .yarnrc.yml next to package.json:

packageExtensions:
  "@storybook/core@*":
    peerDependencies:
      webpack: "*"
  "@storybook/html@*":
    peerDependencies:
      webpack: "^4.0.0 || ^5.0.0"
  "@storybook/marionette@*":
    peerDependencies:
      webpack: "^4.0.0 || ^5.0.0"
  "@storybook/aurelia@*":
    peerDependencies:
      typescript: "*"
  "@storybook/vue@*":
    peerDependencies:
      typescript: "*"
  "@storybook/vue3@*":
    peerDependencies:
      typescript: "*"
  "vue-docgen-api@*":
    peerDependencies:
      vue: "^3.0.11"

These are the peerDependencies that need to be added to the respective projects. vue-docgen-api is not the concern of storybook.

System OS: Windows 8.1 6.3.9600 Binaries: Node: 15.7.0 Yarn: 2.0.0-rc.27 npm: 7.10.0

Additional context

Spin-off of https://github.com/storybookjs/storybook/issues/11397

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
spiltcoffeecommented, May 7, 2021

~This issue should also address the other complaints from Yarn 2 listed here: https://github.com/storybookjs/storybook/issues/11397#issuecomment-830063886~ issues incorporated

0reactions
shilmancommented, Nov 25, 2021

Jeepers creepers!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-rc.8 containing PR #16551 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Yarn 2 compatibility: undeclared peerDependencies (non- ...
Yes, this is only a matter of declaring implicit peer dependencies. NPM accepts if any package pulls those peerDeps in, but Yarn 2...
Read more >
Types of dependencies
Dependencies serve many different purposes. Some dependencies are needed to build your project, others are needed when you're running your program.
Read more >
Gatsby Changelog | 5.3.0
Support for MDX v2: We are updating gatsby-plugin-mdx to be compatible with MDX v2. Keep a look out in the discussion for a...
Read more >
When installing packages with Yarn, what does "incorrect ...
Effectively, peer dependencies are a way for packages to specify, ... for which it matters that all React dependencies are compatible with ...
Read more >
material-ui/core/CHANGELOG.md
38, - [core] Allow React 17 in peer dependencies (#23697) @oliviertassinari ... 309, - [Transition] Prevent passing undefined argument to callbacks (#21158) ...
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