Skip to content
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

CSF file with no stories results in cryptic error #19142

Closed
shilman opened this issue Sep 8, 2022 · 1 comment
Closed

CSF file with no stories results in cryptic error #19142

shilman opened this issue Sep 8, 2022 · 1 comment

Comments

@shilman
Copy link
Member

shilman commented Sep 8, 2022

This file has a valid default export, but no story exports:

import globalThis from 'global';
import { PartialStoryFn, StoryContext } from '@storybook/csf';

export default {
  component: globalThis.Components.Pre,
  decorators: [
    (storyFn: PartialStoryFn, context: StoryContext) => storyFn({ args: { object: context.args } }),
  ],
  argTypes: { /* */ }
}

Resulting in:

image

@shilman
Copy link
Member Author

shilman commented Oct 19, 2022

ZOMG!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-alpha.40 containing PR #19529 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant