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

[@next/storybook] .mdx stories don't appear to work #15197

Closed
jescalan opened this issue Jul 15, 2020 · 2 comments
Closed

[@next/storybook] .mdx stories don't appear to work #15197

jescalan opened this issue Jul 15, 2020 · 2 comments
Labels
good first issue Easy to fix issues, good for newcomers
Milestone

Comments

@jescalan
Copy link
Contributor

Bug report

Describe the bug

While I have been able to get .story.js files working nicely, any attempt to use a .mdx file as a story has resulted in a warning logged like:

Module not found: Error: Can't resolve 'babel-loader' in '/path/to/project'

And while storybook does still start, the .mdx story does not appear. I feel like the error message/trace is probably inaccurate similar to the css error as well.

To Reproduce

  1. Set up the with-storybook example
  2. Modify the config to enable to accept mdx stories by changing the regex on this line to /stories\.(js|mdx)/
  3. Add a xxx.stories.mdx file
  4. Observe the warning and lack of appearance in the interface

Expected behavior

I'd expect for mdx stories to render as expected in storybook normally, and if there is an issue with their rendering, for the error trace to correctly indicate the problem.

System information

  • OS: macOS
  • Version of Next.js: 9.4.4
  • Version of Node.js: 12.13.0
@timneutkens timneutkens added this to the backlog milestone Jul 15, 2020
@Timer Timer added the good first issue Easy to fix issues, good for newcomers label Jul 16, 2020
@jescalan
Copy link
Contributor Author

Quick update, I got this working, it was a user error. Oddly, in order to get mdx stories working, babel-loader and react-is must be explicitly installed alongside the docs addon. Not sure why they didn't just make them dependencies, but 🤷🏼‍♂️

@Timer Timer modified the milestones: backlog, iteration 5 Jul 21, 2020
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Easy to fix issues, good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants