storybook: Storybook 5.2 static app docs either has missing props section or props descriptions
Describe the bug After updating to Storybook 5.2, the props section is rendering fine when running via storybook locally but after generating a static app with the storybook build, the props section either does not show up or the descriptions are missing.
To Reproduce Steps to reproduce the behavior:
- Create a component with proptypes
- Add stories for it.
- When viewing it locally it works fine
- After running
yarn build-storybookand viewing the static app, the props section has the above issues
Expected behavior The props section should be the same as it is when running storybook
Screenshots
Locally

Static app

Code snippets
Alert.defaultProps = {
mode: "static",
type: "warning",
};
Alert.propTypes = {
mode: PropTypes.oneOf(["static", "timed"]),
type: PropTypes.oneOf(["success", "warning", "error", "primary"]),
message: PropTypes.string.isRequired,
/**
* No background or border if static alert
*/
blank: PropTypes.bool,
/**
* Allows icon override, accepts material icon name
*/
icon: PropTypes.string,
};
System:
Environment Info:
System:
OS: macOS 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Binaries:
Node: 10.15.3 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
Browsers:
Chrome: 76.0.3809.132
Safari: 13.0
npmPackages:
@storybook/addon-actions: ^5.2.1 => 5.2.1
@storybook/addon-docs: ^5.3.0-alpha.0 => 5.3.0-alpha.0
@storybook/addon-knobs: ^5.2.1 => 5.2.1
@storybook/addon-links: ^5.2.1 => 5.2.1
@storybook/addon-notes: ^5.2.1 => 5.2.1
@storybook/addons: ^5.2.1 => 5.2.1
@storybook/react: ^5.2.1 => 5.2.1
Additional context None
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 15 (5 by maintainers)
There are a collection of issues piling up with different versions of what’s probably the same underlying problem. I’m going to try to spend some time on it this week.
I was running into the same issue. Setting
NODE_ENVtodevelopmentfor thebuild-storybookcommand got this working for me. The default seems to beNODE_ENV=producctionfor this command. My build-storybook script now looks like so:Not sure what else this might do under the hood, but I’m now seeing props in the static build of Storybook just like when running locally.