You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using sharding in CI or "--includeTags", "--excludeTags" in new versions of @storybook/test-runner does not solve the problem.
env: @storybook/test-runner V0.13.0
reason:
@storybook/test-runner creates an environment variable STORYBOOK_STORIES_PATTERN, into which it places the contents of stories from the storybook config.
If the array of stories in your storybook config is too large, an E2BIG error may occur.
its turns out i've calculated exact path to every "stories" file (there is over 4k of them in monorepo).
solution:
you can load stories to storybook with an array of globs. In this case you can target your stories with a extglobs syntax from picomatch. Like this:
'..src/@(subdirectory)/**/*.stories.@(ts|tsx)'
When parsing such a "glob string" using picomatch, storybook will determine the "normal" part of the path and write it to 'directory', and the part containing patterns as a glob will be written to 'files'.
problem:
Error: spawn E2BIG Failed to launch browser.
using sharding in CI or "--includeTags", "--excludeTags" in new versions of @storybook/test-runner does not solve the problem.
env: @storybook/test-runner V0.13.0
reason:
@storybook/test-runner creates an environment variable STORYBOOK_STORIES_PATTERN, into which it places the contents of stories from the storybook config.
If the array of stories in your storybook config is too large, an E2BIG error may occur.
its turns out i've calculated exact path to every "stories" file (there is over 4k of them in monorepo).
solution:
you can load stories to storybook with an array of globs. In this case you can target your stories with a extglobs syntax from picomatch. Like this:
When parsing such a "glob string" using picomatch, storybook will determine the "normal" part of the path and write it to 'directory', and the part containing patterns as a glob will be written to 'files'.
Storybook will parse this 'glob string' and create a StoriesSpecifier object from it using picomatch.scan.
OR you can load stories from your project with a configuration object to storybook:
Both ways will reduce the number of 'stories' items array, but the first way is a bit shorter)
The text was updated successfully, but these errors were encountered: