chromatic-cli: GitHub action failing with "Storybook package not installed"

With the release of Chromatic CLI v6.0.0 all our GitHub actions using the chromaui/action@v1 are now failing with the following error:

Chromatic CLI v6.0.0
https://www.chromatic.com/docs/cli

Authenticating with Chromatic
    → Connecting to https://index.chromatic.com
Could not retrieve package info from registry; skipping update check
Authenticated with Chromatic
    → Using project token '*'
Retrieving git information
Retrieved git information
    → Commit '*******' on branch 'main'; found 2 parent commits
Collecting Storybook metadata
    → ✖ Storybook package not installed
Could not find @storybook/react in node_modules.
Most likely, you forgot to run npm install or yarn before running Chromatic.

✖ Failed to collect Storybook metadata
✖ Storybook package not installed
Could not find @storybook/react in node_modules.
Most likely, you forgot to run npm install or yarn before running Chromatic.
→ View the full stacktrace below

If you need help, please chat with us at https://www.chromatic.com/docs/cli for the fastest response.
You can also email the team at support@chromatic.com if chat is not an option.

Please provide us with the above CLI output and the following info:
{
  "timestamp": "2021-09-30T13:35:28.504Z",
  "sessionId": "102360cb-5060-471a-82bd-1600fb5a5512",
  "gitVersion": "2.33.0",
  "nodePlatform": "linux",
  "nodeVersion": "12.13.1",
  "packageName": "chromatic",
  "packageVersion": "6.0.0",
  "flags": {
    "projectToken": "***",
    "workingDir": "packages/console-frontend",
    "fromCI": true,
    "interactive": false,
    "exitZeroOnChanges": true,
    "exitOnceUploaded": true,
    "allowConsoleErrors": false
  },
  "buildScript": "build-storybook -s public",
  "errorType": "Error",
  "errorMessage": "✖ Failed to collect Storybook metadata"
}

This is happening across all our builds now with no code changes to the action/package.json/or lock file in our code so appears to be completely isolated to the action itself.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 11
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Hey all Dominic from Chromatic here:

We reverted the latest package 6.0.0 back to 5.10.2. That should unblock you while we debug further.

  • If you use GitHub actions, this should transparently resolve any issues. Try running the action again.
  • If you use the CLI via npx this should also resolve any issues.
  • If you’ve set your package version to 6.0.0 you’ll have to reset it to 5.10.2

Let me know if that works for y’all here or via our in-app chat (faster response).

I’m investigating this, does anyone have a public repository where this occurs?

https://github.com/tobilen/chromatic-repro

checkout run yarn run npx chromatic -t xxx

tell me if you need the project token, i’ll send it via chromatics intercom

I’m facing the same problem

I just released v6.0.2 and this should fix issue where retrieving storybook metadata fails