storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
83.94k stars 9.21k forks source link

Preview intermittently disappears from Canvas #14564

Open andfinally opened 3 years ago

andfinally commented 3 years ago

Describe the bug This may be similar to https://github.com/storybookjs/storybook/issues/9412. I've been getting previews fine, but this morning they stopped appearing in the Canvas tab and refused to come back for quite a while. (Actually, they were appearing and disappearing almost immediately when the page loaded.) I'm back to normal now, just wanted to log this in case it happens to anybody else.

To Reproduce Steps to reproduce the behavior:

  1. Load the Storybook local page at http://localhost:6006/.
  2. Click on one of the stories in the sidebar.

Expected behavior The component preview appears as normal in the Canvas tab.

Screenshots image

Code snippets main.js:

const path = require( 'path' );

module.exports = {
    "stories": [
        '../themes/mytheme/components/**/stories/*.@(js|mdx)',
    ],
    "addons": [
        "@storybook/addon-docs",
        "@storybook/addon-links",
        "@storybook/addon-essentials",
        "@storybook/addon-postcss"
    ],
    webpackFinal: async ( config ) => {
        config.module.rules.push( {
            test: /\.scss$/,
            use: [ 'style-loader', 'css-loader', 'sass-loader' ],
            include: path.resolve( __dirname, '../' ),
        } );

        return config;
    },
    // Adds React import to built JS modules
    babel: async ( options ) => ( {
        ...options,
        "plugins":
            [
                "react-require"
            ],
    } ),
};

System

Environment Info:

  System:
    OS: macOS 10.15.7
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.11 - ~/.nvm/versions/node/v14.16.0/bin/npm
  Browsers:
    Chrome: 89.0.4389.90
    Firefox: 87.0
    Safari: 14.0.3
  npmPackages:
    @storybook/addon-actions: ^6.2.7 => 6.2.7
    @storybook/addon-docs: ^6.2.7 => 6.2.7
    @storybook/addon-essentials: ^6.2.7 => 6.2.7
    @storybook/addon-links: ^6.2.7 => 6.2.7
    @storybook/addon-postcss: ^2.0.0 => 2.0.0
    @storybook/react: ^6.2.7 => 6.2.7

Additional context Add any other context about the problem here.

shilman commented 3 years ago

Do you have a repro repo you can share?

andfinally commented 3 years ago

Thanks @shilman, unfortunately it's a private one, but I just had four very basic stories – please see attached.

storybook.zip

mjimenezbc commented 2 years ago

@andfinally did you fix it? I have the same issue

stale[bot] commented 2 years ago

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!