Skip to content
Latchkey

Chromatic "No Storybook build output" in CI

Chromatic publishes a static Storybook. "No Storybook build output" means the CLI looked for the built folder and found nothing, either because the build step did not run first or because it points at the wrong --storybook-build-dir.

What this error means

The step fails with "No Storybook build output found" or "The build directory ... is empty", naming the expected storybook-static path.

chromatic
✖ No Storybook build output found at storybook-static
Did you forget to run 'build-storybook'?

Common causes

The Storybook build step did not run

Chromatic was invoked with a prebuilt-dir flag, but no build-storybook step produced the folder first.

The build directory path is wrong

The build wrote to a different folder than --storybook-build-dir points at, so Chromatic sees an empty path.

How to fix it

Build Storybook before publishing

  1. Run build-storybook to produce the static output.
  2. Point Chromatic at that exact directory.
  3. Re-run the publish.
Terminal
npm run build-storybook
npx chromatic --storybook-build-dir=storybook-static

Let Chromatic build Storybook

Omit the prebuilt-dir flag so Chromatic runs the build itself when there is no separate build step.

Terminal
npx chromatic --project-token=$CHROMATIC_PROJECT_TOKEN

How to prevent it

  • Order the workflow so build-storybook runs before Chromatic.
  • Match --storybook-build-dir to where the build writes.
  • Verify storybook-static is populated before publishing.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →