Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Storybook hangs/doesn't finish building 8.4.6/8.4.7 #29828

Open
donaldpipowitch opened this issue Dec 6, 2024 · 3 comments
Open

[Bug]: Storybook hangs/doesn't finish building 8.4.6/8.4.7 #29828

donaldpipowitch opened this issue Dec 6, 2024 · 3 comments

Comments

@donaldpipowitch
Copy link
Contributor

donaldpipowitch commented Dec 6, 2024

Describe the bug

We're using Storybook (with React) in version 8.4.5. I noticed that our Renovate update failed for 8.4.6 and now 8.4.7 as well. I didn't create a bug ticket so far, because I cannot reproduce it locally and only see it in our CI (Gitlab).

I decided to create a ticket now as I was checking if someone else has the same problem, but I couldn't find something related. Maybe it helps someone else to jump into the discussion (and ideally a solution later). (#29715 seems to about a different issue.)

Reproduction link

#sorry-:-(

Reproduction steps

No response

System

Storybook in the mentioned versions, Gitlab CI and $ node -v v22.11.0.

Additional context

The last output I get after running $ storybook build--output-dir storybook is this:

Generate File to /builds/xxx/yyy/storybook/meta.json
info => Preview built (1.33 min)
info => Output directory: /builds/xxx/yyy/storybook
attention => Storybook now collects completely anonymous telemetry regarding usage.
This information is used to shape Storybook's roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://storybook.js.org/telemetry

Afterwards my CI job runs into a timeout. As far as

I tried to get more information by using different log levels and --debug, but I couldn't get more information. I will try to debug more and if I find a solution/workaround I will update (and close) this issue.

Copy link
Contributor

greptile-apps bot commented Dec 6, 2024

** Disclaimer** This information might be inaccurate, due to it being generated automatically
This appears to be related to the telemetry prompt hanging after build completion. Try these steps:

  1. Disable telemetry by setting STORYBOOK_DISABLE_TELEMETRY=1 in your CI environment variables

  2. If still hanging, add --no-manager-cache flag to your build command to bypass potential manager cache issues

  3. If issue persists, you can try adding process.exit(0) at the end of your .storybook/main.js to force exit after build completion

Please provide the contents of your .storybook/main.js and any build errors from CI logs with --debug flag if these steps don't resolve the issue.

About Greptile

This response provides a starting point for your research, not a precise solution.

Help us improve! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

Edit Issue Bot Settings · Greptile

@rjaguilar
Copy link

rjaguilar commented Dec 6, 2024

I'm having the same issue

  1. I have added STORYBOOK_DISABLE_TELEMETRY=1 to my environment variables
  2. --no-manager-cache is not an option with build https://storybook.js.org/docs/6/api/cli-options#build-storybook

here is my main.ts

import type { StorybookConfig } from '@storybook/react-vite';
// For help finding packages in monorepo: https://storybook.js.org/docs/react/faq#how-do-i-fix-module-resolution-in-special-environments
function getAbsolutePath(value: string): string {
  return dirname(require.resolve(join(value, 'package.json')));
}

const config: StorybookConfig = {
  stories: [
    '../libs/**/*.stories.@(js|jsx|ts|tsx|mdx)',
  ],
  addons: [
    getAbsolutePath('@storybook/addon-links'),
    getAbsolutePath('@storybook/addon-essentials'),
    getAbsolutePath('@storybook/addon-interactions'),
    getAbsolutePath('@storybook/addon-a11y'),
    getAbsolutePath('@chromatic-com/storybook'),
  ],
  framework: {
    name: getAbsolutePath('@storybook/react-vite') as '@storybook/react-vite',
    options: {
      builder: {
        viteConfigPath: join(__dirname, '..', 'vite.config.storybook.ts'),
      },
    },
  },
  staticDirs: ['./public'],
  docs: {},
  typescript: {
    reactDocgen: 'react-docgen-typescript',
  },
};
export default config;

This is all working with 8.4.5 for me with 8.4.7 just hanging in my pipeline

@gardsa
Copy link

gardsa commented Dec 9, 2024

Just adding a comment here to say this is also happening in our app. Haven't had time to debug further.

System:

  • Storybook: v8.4.6 and v8.4.7
  • React: v18.3.1
  • Node: v22.1.0
  • CI: GitHub Actions

Here is the main.ts:

import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
  stories: ["../src/**/!(guides)/*.mdx", "../src/**/*.stories.@(ts|tsx)"],
  addons: [
    "@storybook/addon-links",
    "@storybook/addon-essentials",
    "@storybook/addon-interactions",
    "@storybook/addon-a11y",
  ],
  framework: {
    name: "@storybook/react-vite",
    options: {},
  },
  docs: {
    autodocs: "tag",
  },
  typescript: {
    reactDocgen: "react-docgen-typescript",
    reactDocgenTypescriptOptions: {
      include: ["src/**/*.tsx"], // https://github.com/storybookjs/storybook/issues/22164#issuecomment-2292959229
    },
  },
};

export default config;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Empathy Backlog
Development

No branches or pull requests

4 participants