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

publish command error caused by Storybook params #25

Open
majouji opened this issue Apr 19, 2024 · 1 comment
Open

publish command error caused by Storybook params #25

majouji opened this issue Apr 19, 2024 · 1 comment

Comments

@majouji
Copy link

majouji commented Apr 19, 2024

Trying to publish a sample component and I’m getting the following error for multiple components (not the component I’m trying to publish, but colocated components in the parent directory:

Error parsing story /Users/ramy/GitHub/metal-design-system/packages/component-library/src/components/Banner/Banner.stories.tsx: ParserError: "url" property not found in "design" object in story metadata
 -> /Users/ramy/GitHub/metal-design-system/packages/component-library/src/components/Banner/Banner.stories.tsx:154:11

The url prop is present and filled in the story file, but it’s pointing to an object in a different file, like so (we keep all the links in one place for Storybook for easier updating):

export default {
  component: Banner,
  decorators: [colorModeDecorator(), paddingDecorator()],
  parameters: {
    chromatic: { viewports: chromaticViewportParameters() },
    design: {
      type: "figma",
      url: FigmaLinks.web.v1.Banner,
    },
  },
};

Guessing this is some kind of conflict with the design add-on?

It’s also unclear to me why it’s trying to do anything with those files since I don’t have a .figma.tsx file for those. I’m only trying to publish one component but it’s returning this error for many unrelated components.

Happy to provide more details here!

@ptomas-figma
Copy link
Collaborator

ptomas-figma commented Apr 22, 2024

Thanks for reaching out. The storybook parser checks for any usage of design.url in story files, but, unfortunately, we only parse strings for the url field at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants