I separately build the storybook for caching purposes in CI so we speed up the process in our monorepo. And for this I use the storybookBuildDir option in the chromatic.config.json file.
But when I push the play button in the storybook interface, the chromatic command fails:
Invalid Storybook build at storybook-static: ENOENT: no such file or directory, scandir 'storybook-static'
This is because in development, the developers don't build the storybook locally, which is fine.
I understand that the addon just delegates the build responsibility to the chromatic command. But could either the addon or the chromatic command trigger a build if there's nothing on the storybookBuildDir?
To reproduce
Setup chromatic.config.json with storybookBuildDir
Remove the storybookBuildDir folder if there's any
Start the storybook: storybook dev -p 6006
Push the play button to trigger the visual tests addon
Describe the bug
I separately build the storybook for caching purposes in CI so we speed up the process in our monorepo. And for this I use the
storybookBuildDir
option in thechromatic.config.json
file.But when I push the play button in the storybook interface, the chromatic command fails:
This is because in development, the developers don't build the storybook locally, which is fine.
I understand that the addon just delegates the build responsibility to the
chromatic
command. But could either the addon or the chromatic command trigger a build if there's nothing on thestorybookBuildDir
?To reproduce
chromatic.config.json
withstorybookBuildDir
storybookBuildDir
folder if there's anystorybook dev -p 6006
Environment