Chromatic "Failed to publish build" in CI
The Chromatic CLI authenticated and started a build but the publish step did not finish, often due to a transient network failure during upload or a build that produced no valid output to send.
What this error means
The step fails with "Failed to publish build" or an upload error after the Storybook was built, sometimes after a partial upload.
✖ Failed to publish build
Error: read ECONNRESET while uploading to ChromaticCommon causes
A transient network drop during upload
The connection to Chromatic dropped mid-upload, so the build could not be finalized.
No valid Storybook output to publish
The build folder was empty or corrupt, so there was nothing complete to publish.
How to fix it
Retry and confirm the build output
- Confirm
storybook buildproduced a populatedstorybook-static. - Re-run the Chromatic step to recover from a transient upload drop.
- If it persists, run Chromatic with debug output to see the failing request.
npx chromatic --project-token=$CHROMATIC_PROJECT_TOKEN --debugLet Chromatic build Storybook itself
Point Chromatic at a prebuilt directory or let it build, but not a stale empty folder.
npx chromatic --storybook-build-dir=storybook-staticHow to prevent it
- Verify the Storybook build succeeds before publishing.
- Retry transient upload failures rather than treating them as fatal.
- Use
--debugto capture the failing request when it recurs.