storybookjs / storybook

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

[Bug]: Storybook crashes after loading component #23978

Open EugeneKamikaZe opened 1 year ago

EugeneKamikaZe commented 1 year ago

Describe the bug

Crashing after component load

Безымянный1 Безымянный2 Безымянный3

https://github.com/storybookjs/storybook/assets/25720221/7a226adb-5176-4c0c-a52b-2353abefd89f

To Reproduce

After component render


main.ts ->

const config: StorybookConfig = {
    stories: ['../../src/**/*.stories.@(js|jsx|mdx|ts|tsx)'],
    staticDirs: ['../../public'],
    addons: [
        '@storybook/addon-links',
        '@storybook/addon-essentials',
        '@storybook/addon-interactions',
        '@storybook/theming',
        {
            name: '@storybook/addon-coverage',
            options: {
                istanbul: {
                    ...coverageConfig,
                },
            },
        },
        '@storybook/addon-storysource',
        '@storybook/addon-a11y',
        '@whitespace/storybook-addon-html',
        '@bbbtech/storybook-formik/register',
        '@geometricpanda/storybook-addon-badges',
        '@storybook/addon-designs',
        'storybook-css-modules',
        'storybook-react-i18next',
        'storybook-addon-mock',
    ],
    framework: {
        name: '@storybook/react-vite', 
        options: {
            builder: {
                viteConfigPath: './vite.config.ts',
            },
        },
    },
    core: {
        builder: '@storybook/builder-vite',
    },
    typescript: {
        reactDocgen: 'react-docgen', 
    },
    async viteFinal(config, { configType }) {
        return mergeConfig(config, {
            resolve: {
                alias: {
                    '~': path.resolve(__dirname, '../../src'),
                },
            },
        });
    },
};

System

node - v18.17.1
npm - 9.6.7
react - 18.2.0
@storybook/addon-a11y - 7.3.2
@storybook/addon-actions - 7.3.2
@storybook/addon-coverage - 0.0.9
@storybook/addon-designs - 7.0.5
@storybook/addon-essentials - 7.3.2
@storybook/addon-interactions - 7.3.2
@storybook/addon-links - 7.3.2
@storybook/addon-storyshots - 7.3.2
@storybook/addon-storyshots-puppeteer - 7.3.2
@storybook/addon-storysource - 7.3.2
@storybook/addon-styling - 1.3.7
@storybook/builder-vite - 7.3.2
@storybook/builder-webpack5 - 7.3.2
@storybook/cli - 7.3.2
@storybook/jest - 0.2.1
@storybook/manager-api - 7.3.2
@storybook/manager-webpack5 - 6.5.16
@storybook/react - 7.3.2
@storybook/react-vite - 7.3.2
@storybook/test-runner - 0.13.0
@storybook/testing-library - 0.2.0
@storybook/theming - 7.3.2
storybook-addon-mock - 4.2.1
storybook-addon-sass-postcss - 0.1.3
storybook-addon-themes - 6.1.0
storybook-css-modules - 1.0.8
storybook-react-i18next - 2.0.8
typescript - 4.7.4
vite - 4.4.9

Additional context

No response

vanessayuenn commented 1 year ago

Hi, thanks for reporting this. Can you please share a repro (see how to create a repro)? We prioritize bug reports that have reproduction. Thank you! 🙏

EugeneKamikaZe commented 1 year ago

I can't, because my repo is private. But i try to reproduce repo today or tomorrow

EugeneKamikaZe commented 1 year ago

@vanessayuenn i created repo https://github.com/EugeneKamikaZe/test-storybook-error