question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unknow description with storybook 6.5.0 and vitejs 3.0

See original GitHub issue

Describe the bug unknow description in the Doc tab

Capture d’écran 2022-09-19 à 10 53 27

System Environment Info:

System: OS: macOS 12.4 CPU: (8) arm64 Apple M2 Binaries: Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm Browsers: Chrome: 105.0.5195.125 Firefox: 104.0.2 Safari: 15.5

Additional context

  • I have a monorepo with a react ui components library made with vitejs in packages folder
  • I have storybook installed in docs folder
- docs/storybook (as @starter/storybook)
- packages/core (as @starter/core)

When building my lib and using it in storybook, it can’t read types/interfaces from my component (with docgen?!) Info : Button component is a default exported component. I use storybook Button example as component

// Button.stories.tsx
import { Button } from "@starter/core";
...

But if I’m using Button example from storybook directly in my docs/storybook folder, it’s working

// Button.stories.tsx
Import Button from './Button'
...
// Button.tsx
...
Capture d’écran 2022-09-19 à 10 54 08

Interface is the following :

interface ButtonProps {
  /**
   * Is this the principal call to action on the page?
   */
  primary?: boolean;
  /**
   * What background color to use
   */
  backgroundColor?: string;
  /**
   * How large should the button be?
   */
  size?: "small" | "medium" | "large";
  /**
   * Button contents
   */
  label: string;
  /**
   * Optional click handler
   */
  onClick?: () => void;
}

It can’t read the description as well :

/**
 * Primary UI component for user interaction
 */

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
joshwoodingcommented, Sep 19, 2022

@IanVS Im waiting for a fix to land in react-docgen-typescript officially. 😦

0reactions
clementcreusatcommented, Sep 20, 2022

My workaround for now is to change stories paths in main.js in storybook directory:

// main.js
stories: [
    "../../../packages/core/src/*.stories.mdx",
    "../../../packages/core/src/*.stories.@(js|jsx|ts|tsx)",
]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Storybook for Vue 3 - JS.ORG
Storybook is an open source tool for building UI components. It speeds up UI development, generates documentation, and automates testing.
Read more >
@storybook/vue | npm | Open Source Insights
Storybook is a frontend workshop for building UI components and pages in isolation. Made for UI development, testing, and documentation.
Read more >
@storybook/addon-storyshots | Yarn - Package Manager
6.5.14 (December 2, 2022). Bug Fixes. Angular: Fix "webpack_require.nmd is not a function issue" in Angular 15 #20043; CLI/React native: Fix addons template ......
Read more >
Migrating multiple Dashboards-services from vue 2 to vue 3
Hi, I am thinking about migrating to vue3. I am experiencing some issues with the vue/compat: Our project consists out of multiple ...
Read more >
Vue: Add Vue3 support #10654 - Issuehunt
node_modules/@storybook/vue/dist/client/preview/index.js (index.js:24) at ... npx sb init --prerelease doesn't work I get the error error: unknown option ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found