-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
toJSX does not have a default for options.file
#1153
Comments
This sounds like a storybook problem to me? 🤔 maybe you'll have better luck asking those folks? |
After some more investigation... I am more convinced it is actually related to the commit I referenced. In there, I believe the wrong option is possibly being selected. |
I am experiencing the exact same issue. When I update my package.json to add the following to my
So I think it is definitely related to 1.6.8. Now it might be in the way that |
/cc @silvenon |
I hit this same thing and same as @owenallenaz, if I force
I'm using Yarn. Not sure if that same thing works with npm or not. |
Ah, yeah we need to more gracefully handle |
This should now be fixed in version |
@johno Issue still seems to be there, same error. Confirmed the upgrade to |
Hrmmm. Bummer! Thanks for checking @dustinsavery Could someone perhaps provide a reproduction so I can debug this more deeply? |
I’m guessing the file argument must be coming in as null rather than undefined. |
It's called from here |
We should definitely add that, but right now the MDX core package isn't transpiled and we support older versions of node that don't have optional changing. I've opened up another PR which will hopefully address more falsy edge cases. |
Hopefully |
Forcing resolution back to 1.6.6 fixes it |
@mdx-js/mergers A patch version need to be released. |
Released |
The latest version should now fix it. Please let us know if that isn't the case. Thanks all! |
I just want to add that |
@silvenon tested with Storybook 5.3.19 I can confirm version |
Thanks so much for the fix. If it's fine by you, we'll make the fix on the Storybook side (along with any other breaking fixes needed) when MDX 2.0 drops. Really looking forward to that---you guys are doing amazing work!!! |
Same here! Thanks for your help everyone! |
Thanks @RoachaelRoadmunk for reporting this issue. |
Subject of the issue
After the most recent release, Storybook will not build and returns this error:
This might be Storybook's issue to solve, but it also seems as if there isn't a defaulting occurring for
options.file
inside oftoJSX()
here, which was introduced in #1126.Your environment
@storybook/addon-docs ^5.3.13
,@storybook/react ^5.3.13
Steps to reproduce
.stories.mdx
file in a storybook buildbuild-storybook
script that Storybook ships withExpected behaviour
Storybook builds
Actual behaviour
Storybook fails building with the above error
The text was updated successfully, but these errors were encountered: