-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run a build with no stories. #774
Comments
Hi @Th3S4mur41! Thanks for reaching out! Can you send us a reproduction or more details of your setup? Are these repositories available to look at? |
Hey @thafryer, But it is very minimalistic. I just created a new repo and initialized Storybook 7 with web components and vite. Then I adapted the /** @type { import('@storybook/web-components-vite').StorybookConfig } */
const config = {
stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
features: {
buildStoriesJson: true,
modernInlineRender: true,
storyStoreV7: true
},
framework: {
name: '@storybook/web-components-vite',
options: {}
},
docs: {
autodocs: 'tag'
},
refs: {
web: {
title: 'lib',
url: 'https://main--***182.chromatic.com/'
}
}
};
export default config; For the deployment, I build storybook with - name: '🚀 Deploy'
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
storybookBuildDir: dist
zip: true
exitOnceUploaded: true Is there anything else I can provide, that would help you with this? |
I'm also using Storybook Composition, but don't have the issue you are having. This as i created a mdx-story as a landingpage with instructions for users. |
@work933k I just tried to remove my dummy story, hoping that maybe a storybook update fixed it, but still seing the same issue... |
Chromatic has a hardcoded check that requires at least one story to be present in your Storybook, even if you don't run UI Tests or UI Review. Composed stories aren't considered part of the published Storybook. This is a sanity check to ensure your Storybook loads correctly. Having a Storybook without stories is usually a sign of a misconfigured |
@ghengeveld in our case we have some .mdx pages in this Storybook, but no story since there is no component in it. |
You could setup a bare export default {
title: "Welcome",
render: () => null,
}
export const Welcome = {} I think this would work. |
Unfortunately not, this is what storybook renders with that code.
|
Yeah okay, it's not allowed to return null from render. If you use React (and import it) then you can do |
I have deployed multiple storybooks for various packages and would like to bring them all together using composition.
I have therefore created an additional repo/storybook, that only contains some information (Introduction, changelogs, references, ...) in form of mdx files and references the other storybooks in the
main.js
.While the local build works fine, deploying to chromatic fails with the following error:
I'd like to avoid being force to create a dummy story just to be able to deploy this one
The text was updated successfully, but these errors were encountered: