Storybook: Chakra UI: Storybook not running after upgrade

Created on 22 Jul 2020  路  2Comments  路  Source: storybookjs/storybook

Describe the bug
I recently upgraded to 6.0.0-rc.13 and I'm getting some errors related to React Docgen Typescript. Is there a way to turn off this step?

Steps to reproduce

  1. Clone https://github.com/chakra-ui/chakra-ui/tree/develop
  2. Edit main.js to run all storybook files
  3. You'll see the same error as attached below. The packages that seem to be problematic are "slider", and "system". I wonder if I'm doing anything wrong there.

Expected behavior
Ideally, I'd love it to just work out of the box. If there are any changes I need to make, I'd love to know

Screenshots
Screenshot 2020-07-22 at 3 16 47 AM

react question / support typescript

All 2 comments

Hey @segunadebayo, big fan of Chakra UI! A few things from looking at the Storybook setup:

  1. Upgrade using npx sb@next upgrade --prerelease. That way all the storybook packages are on the latest version.
  2. Remove @storybook/preset-typescript. Zero-config typescript is built in now.

After doing those two steps it's working out of the box on my machine.

If you want, you can turn off react-docgen-typescript by adding the following line to your .storybook/main.js:

module.exports = {
  stories: ["../packages/**/*.stories.tsx"],
  typescript: {
    reactDocgen: false,
  },
}

react-docgen-typescript is used to automatically generate prop tables and controls in SB6 if you have addon-docs and addon-controls enabled. On my machine, turning it off reduced the startup time from 32s to 9s.

Let me know if that works for you!

Amazing! Thank you @shilman.

It worked!

I'm forever a big fan of Storybook 馃挅

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Olian04 picture Olian04  路  78Comments

hckhanh picture hckhanh  路  69Comments

Gongreg picture Gongreg  路  58Comments

ChucKN0risK picture ChucKN0risK  路  74Comments

joeruello picture joeruello  路  79Comments