question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

building your Storybook fails (only with chromatic)

See original GitHub issue

yarn: 1.22.5

npm: 6.14.9

$ CHROMATIC_PROJECT_TOKEN=xxx npx chromatic --exit-zero-on-changes

Chromatic CLI v5.5.0
https://www.chromatic.com/docs/cli

  ✔ Authenticated with Chromatic
    → Using project token '*******ncmi'
  ✔ Retrieved git information
    → Commit 'b0c8382' on branch 'master'; found 1 baseline commit
  ✔ Collected Storybook metadata
    → Storybook v6.1.11 for Vue; supported addons found: Actions, Backgrounds, Docs, Links, Viewport
  ✖ Building your Storybook
    → Command failed: build-storybook -- --output-dir /tmp/chromatic--31522-Y2kKkIx9HmLt
    Publish your built Storybook
    Verify your Storybook
    Take snapshots of your stories

The CLI tried to run your build-storybook script, but the command failed. This indicates a problem with your Storybook. Here's what to do:

- Check the Storybook build log printed below.
- Run npm run build-storybook or yarn build-storybook yourself and make sure it outputs a valid Storybook by opening the generated index.html in your browser.
- Review the build-storybook CLI options at https://storybook.js.org/docs/configurations/cli-options/#for-build-storybook

Command failed with exit code 1: npm run --silent build-storybook -- --output-dir /tmp/chromatic--31522-Y2kKkIx9HmLt

ℹ Storybook build output:
build-storybook.log

build-storybook.log exists but is empty. If I run the failed command npm run --silent build-storybook -- --output-dir /tmp/chromatic--31522-Y2kKkIx9HmLt manually, the storybook gets build.

┆Issue is synchronized with this Asana task by Unito

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:36 (18 by maintainers)

github_iconTop GitHub Comments

15reactions
thelfensdrfercommented, Feb 25, 2021

@nikandlv I solved this issue by building the storybook manually and only upload it via the chromatic-cli:

yarn build-storybook
npx chromatic --exit-zero-on-changes -d storybook-static/
10reactions
blvdmitrycommented, Mar 31, 2021

Had the same issue and it was resolved by changing my package.json script from npx chromatic --project-token abc to chromatic --project-token abc

Read more comments on GitHub >

github_iconTop Results From Across the Web

Errors component • chromaui/chromatic-cli
The CLI tried to run your build:storybook script, but the command failed. This indicates a problem with your Storybook. Here's what to do:...
Read more >
Storybook-chromatic NPM - npm.io
Chromatic CLI. Publishes your Storybook to Chromatic and kicks off tests if they're enabled. Install. yarn add chromatic. Usage.
Read more >
Chromatic deployment error when using github-actions
Error : ✖ Failed to collect Storybook metadata Could not find a supported Storybook viewlayer package. Make sure one is installed, or set ......
Read more >
CLI options - Storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >
Deploying your Storybook with Chromatic
Using Chromatic for automatic Storybook deployment. ... Throughout this course, we learned that without Storybook, in order to build a feature in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found