#build-storybook works locally but fails in GitHub Actions workflow

1 messages · Page 1 of 1 (latest)

toxic cobalt
#

I'm trying to set up Chromatic deployment in GitHub and I've narrowed down a problem to the build-storybook step. Unfortunately, I can't find any information about this particular error and can't reproduce it locally.

Error output:

Run npm run --silent build-storybook
  npm run --silent build-storybook
  shell: /usr/bin/bash -e {0}
@storybook/cli v7.1.0

info => Cleaning outputDir: /storybook-static
info => Loading presets
info => Building manager..
info => Manager built (394 ms)
info => Copying static files: /home/runner/work/kezuri/kezuri/node_modules/@storybook/manager/static at /home/runner/work/kezuri/kezuri/storybook-static/sb-common-assets
vite v4.3.9 building for production...

./sb-common-assets/fonts.css doesn't exist at build time, it will remain unchanged to be resolved at runtime
transforming...
✓ 108 modules transformed.
✓ built in 7.24s
Could not resolve "./Card" from "src/components/card/card.stories.ts"
file: /home/runner/work/kezuri/kezuri/src/components/card/card.stories.ts
ERR! RollupError: Could not resolve "./Card" from "src/components/card/card.stories.ts"
ERR!     at error (file:///home/runner/work/kezuri/kezuri/node_modules/rollup/dist/es/shared/node-entry.js:2245:30)
ERR!     at ModuleLoader.handleInvalidResolvedId (file:///home/runner/work/kezuri/kezuri/node_modules/rollup/dist/es/shared/node-entry.js:24632:24)
ERR!     at file:///home/runner/work/kezuri/kezuri/node_modules/rollup/dist/es/shared/node-entry.js:24594:26
honest spear
#

and the command runs locally without issue?

toxic cobalt
#

Yes, local works fine