-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
MDX files not rendering #17455
Comments
MDX released a breaking change & I'm pretty sure that we've covered our bases to force the old version. However, it's possible that somehow the new version is getting installed. I'd love to get to the bottom of this! Do you a have a reproduction repo you can share? If not, can you create one? See how to create a repro. Thank you! 🙏 |
Also experiencing this when we try to update I think somehow Storybook or the MDX parser is relying on |
Can confirm downgrading to v1.6.22 of |
Worth noting I'm also using Yarn PnP here! |
Just to add more docs on this: https://mdxjs.com/migrating/v2/, we now need to specify the React dependency explicitely. Repro at Vulcan by upgrading to v2: https://github.com/VulcanJS/vulcan-npm. @shilman Next take on this is interesting, as you can provide options to the mdx loader: https://github.com/vercel/next.js Edit: ok there is at least a Manual configuration documented here: https://www.npmjs.com/package/@storybook/addon-docs. I also see Edit2: hmm couldn't make it work at this point, here's the branch where I tested: https://github.com/VulcanJS/vulcan-npm/tree/feature/mdx2 (also in "starters/next", I have 2 sb config, see the latest commit for more info) |
I would love to see support for an Right now, without this plugin, things like markdown tables are not supported: Another option would be for Storybook to add a set of plugins automatically such that files are parsed closer to MDXv1 in functionality (e.g. auto-linking, tables) but I suspect this isn't ideal as it changes the default in Storybook to be different than the default of MDXv2. |
@nickpresta we're switching to a new model in Storybook7 where you can use a standard MDX loader instead of Storybook's custom one. I'll write about that soon as an RFC, so please keep your eyes peeled |
We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:
|
Describe the bug
Attempting to render any
.stories.mdx
file results in the following error:Inspecting the top of stack shows:
To Reproduce
Create the following
main.stories.mdx
:System
Please paste the results of
npx sb@next info
here.The text was updated successfully, but these errors were encountered: