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.
✖ 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
- Run
build-storybookto produce the static output. - Point Chromatic at that exact directory.
- Re-run the publish.
npm run build-storybook
npx chromatic --storybook-build-dir=storybook-staticLet Chromatic build Storybook
Omit the prebuilt-dir flag so Chromatic runs the build itself when there is no separate build step.
npx chromatic --project-token=$CHROMATIC_PROJECT_TOKENHow to prevent it
- Order the workflow so
build-storybookruns before Chromatic. - Match
--storybook-build-dirto where the build writes. - Verify
storybook-staticis populated before publishing.