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

[Bug]: [addon-docs] MDX stories not working at all #30016

Open
ayZagen opened this issue Dec 11, 2024 · 1 comment
Open

[Bug]: [addon-docs] MDX stories not working at all #30016

ayZagen opened this issue Dec 11, 2024 · 1 comment

Comments

@ayZagen
Copy link

ayZagen commented Dec 11, 2024

Describe the bug

I tried the code example in code/addons/docs/vue3/README.md#mdx but it does not work at all.

I tried with both 8.4.7 and 8.5.0-alpha.20 both versions fails. Also without creating mdx file (which does not throw the error) Docs tab is not shown at all.

Following error is thrown:

Unable to index ./src/stories/Test.stories.mdx:
WARN   Error: Invariant failed: No matching indexer found for /home/projects/llqiwrnnox.github/src/stories/Test.stories.mdx
WARN     at invariant (/home/projects/llqiwrnnox.github/node_modules/@storybook/core/dist/core-server/index.cjs:34558:11)
WARN     at Si.extractStories (/home/projects/llqiwrnnox.github/node_modules/@storybook/core/dist/core-server/index.cjs:34758:5)
WARN     at eval (/home/projects/llqiwrnnox.github/node_modules/@storybook/core/dist/core-server/index.cjs:34703:53)
WARN     at eval (/home/projects/llqiwrnnox.github/node_modules/@storybook/core/dist/core-server/index.cjs:34679:30)
WARN     at eval (/home/projects/llqiwrnnox.github/node_modules/@storybook/core/dist/core-server/index.cjs:34676:26)
WARN     at Si.updateExtracted (/home/projects/llqiwrnnox.github/node_modules/@storybook/core/dist/core-server/index.cjs:34668:23)
WARN     at Si.ensureExtracted (/home/projects/llqiwrnnox.github/node_modules/@storybook/core/dist/core-server/index.cjs:34702:16)
WARN     at Si.initialize (/home/projects/llqiwrnnox.github/node_modules/@storybook/core/dist/core-server/index.cjs:34663:16)

Reproduction link

https://stackblitz.com/edit/github-tyj2nvxh?file=src%2Fstories%2FTest.stories.mdx

Reproduction steps

  • add addon-docs addon
  • create an mdx file like in example

System

Storybook Environment Info:

  System:
    OS: Linux 5.15 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 22.12.0 - ~/.local/share/mise/installs/node/22.12.0/bin/node
    npm: 10.9.0 - ~/.local/share/mise/installs/node/22.12.0/bin/npm
    pnpm: 9.15.0 - ~/.local/share/mise/installs/node/22.12.0/bin/pnpm <----- active
  npmPackages:
    @storybook/addon-docs: ^8.4.7 => 8.4.7 
    @storybook/addon-essentials: ^8.4.7 => 8.4.7 
    @storybook/addon-interactions: ^8.4.7 => 8.4.7 
    @storybook/addon-onboarding: ^8.4.7 => 8.4.7 
    @storybook/blocks: ^8.4.7 => 8.4.7 
    @storybook/test: ^8.4.7 => 8.4.7 
    @storybook/vue3: ^8.4.7 => 8.4.7 
    @storybook/vue3-vite: ^8.4.7 => 8.4.7 
    storybook: ^8.4.7 => 8.4.7

Additional context

No response

@shilman
Copy link
Member

shilman commented Dec 22, 2024

This is a documentation bug. MDX stories was removed in 8.0

https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#dropping-support-for-storiesmdx-csf-in-mdx-format-and-mdx1-support

I'll remove those old docs to avoid confusion.

@shilman shilman added the mdx label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants