@storybook/addon-info not working
See original GitHub issueDescribe the bug Just installed @storybook/addon-info. When following the instruction in the readme I either get No Preview or it’s stuck in the loading state (see screenshot). Nothing in the console to say there is an error.
Expected behavior Could I get instruction on how to fix?
Screenshots
Code snippets
When trying to do it on a Component for which I get No Preview ` import React from ‘react’; import { storiesOf, addDecorator } from ‘@storybook/react’; import { withA11y } from ‘@storybook/addon-a11y’; import { withInfo } from ‘@storybook/addon-info’;
import StandardAction from ‘./StandardAction’;
addDecorator(withA11y);
storiesOf(‘Navigation|Buttons’, module)
.addDecorator(withInfo)
.add(‘Standard Action’, () => (
<StandardAction label="label" />
),
{ info: ‘☹️ no emojis’ },
);
“@storybook/addon-a11y”: “^5.0.10”,
“@storybook/addon-actions”: “^5.0.10”,
“@storybook/addon-info”: “^5.0.10”,
“@storybook/addon-links”: “^5.0.10”,
“@storybook/addons”: “^5.0.10”,
“@storybook/react”: “^5.0.10”,
`
For when I’m trying to do it globally and it gets stuck in Loading state config.js `import { configure } from ‘@storybook/react’; import { withInfo } from ‘@storybook/addon-info’;
import ‘…/src/index.scss’;
addDecorator(withInfo);
function loadStories() { require(‘…/src/atoms/StandardAction/StandardAction.stories’); require(‘…/src/atoms/NoNav/NoNav.stories’); require(‘…/src/atoms/SelectListInput/SelectListInput.stories’); require(‘…/src/atoms/Container/Container.stories’); }
configure(loadStories, module);`
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
Top GitHub Comments
@palmerminto @shilman I’m having the same issue. Basically, when I’m importing withInfo as
import {withInfo} from '@storybook/addon-info'
I immediately see that the left panel never loads and the cursor continually shows loading. Basically, if I never import withInfo, everything works fine. I’m running Storybook 5.0.11. On a side note, I’m running React 16.3, so not sure if that is what is causing the problem. I cannot upgrade to a higher version due to our code base. As noted above though, Storybook/withInfo should not be dependent on newer versions or React.hey @devina91, Could you open a new issue - you’ll probably get a more focused solution? I’m going to close this.