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.

Storybook Controls broken after 6.2 to 6.3 upgrade (and Webpack 4 to 5).

See original GitHub issue

Description

Storybook controls are no longer being created correctly (or at all) after updating from 6.2 to 6.3. I also made moderate changes to the config as part of the update, including forcing the use of Webpack 5.

You can view the correct output on the stories here (main branch): https://vimeo.github.io/iris/sb/main/?path=/story/components-buttons-button--button

You can view the faulty output on the stories here (refactor branch): https://vimeo.github.io/iris/sb/refactor/?path=/story/components-button--button

Here’s the current config files: https://github.com/vimeo/iris/tree/main/.storybook

And the new config for the refactor branch: https://github.com/vimeo/iris/tree/refactor/.storybook

Reproduction

You can view this issue at https://github.com/vimeo/iris/tree/refactor.

  1. Clone/pull and check out the refactor branch
  2. Run yarn
  3. Run yarn storybook

System

Environment Info:

  System:
    OS: macOS 11.5.2
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 14.17.3 - ~/.nvm/versions/node/v14.17.3/bin/node
    Yarn: 1.22.4 - ~/.yarn/bin/yarn
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.3/bin/npm
  Browsers:
    Chrome: 92.0.4515.159
    Firefox: 90.0.2
    Safari: 14.1.2
  npmPackages:
    @storybook/addon-a11y: ^6.3.7 => 6.3.7 
    @storybook/addon-design-assets: ^6.2.9 => 6.2.9 
    @storybook/addon-essentials: ^6.3.7 => 6.3.7 
    @storybook/addon-knobs: ^6.3.0 => 6.3.0 
    @storybook/addon-links: ^6.3.7 => 6.3.7 
    @storybook/addon-storysource: ^6.3.7 => 6.3.7 
    @storybook/addons: ^6.3.7 => 6.3.7 
    @storybook/builder-webpack5: ^6.4.0-alpha.31 => 6.4.0-alpha.31 
    @storybook/components: ^6.3.7 => 6.3.7 
    @storybook/core-events: ^6.3.7 => 6.3.7 
    @storybook/manager-webpack5: ^6.4.0-alpha.31 => 6.4.0-alpha.31 
    @storybook/react: ^6.3.7 => 6.3.7 
    @storybook/theming: ^6.3.7 => 6.3.7 

Screenshots

before Screen Shot 2021-08-23 at 1 20 20 PM

after Screen Shot 2021-08-23 at 1 20 18 PM

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
shilmancommented, Aug 31, 2021

I meant you should see a warning today–tho I realize that the warning heuristic is incomplete and doesn’t handle your use case. Hopefully we can solve this strange interdependency soon!

1reaction
shilmancommented, Aug 31, 2021

Yes that’s intended (although suboptimal). There should be a warning in the CLI output saying that you should run addon-docs before addon-controls – this is why.

We’re planning a big refactor to decouple the two addons, so that controls and docs can function independently from one another. In the meantime, addon-docs is required for auto-generated controls.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Storybook 6.3 - JS.ORG
For 6.3, we upgraded and sped up the React TypeScript docgen processing that automatically generates UI controls for your component props.
Read more >
Webpack 5 and Storybook 6 integration throws an error in ...
We had the same issue. First, you will need to install @storybook/builder-webpack5@next . Then you have to upgrade every @storybook ...
Read more >
@storybook/addon-controls | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
storybook/addon-docs
Document component usage and properties in Markdown. Latest version: 6.5.15, last published: 4 days ago. Start using @storybook/addon-docs ...
Read more >
Upgrade To Webpack 5 Breaking Storybook 5
To use the Controls addon you need to write your stories using args.Storybook ... Storybook Controls broken after 6.2 to 6.3 upgrade and...
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