-
Notifications
You must be signed in to change notification settings - Fork 106
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] Missing package @mdx-js/react on scratch build sveltekit + storybook + builder-vite #391
Comments
Might be related to this? brillout/vite-plugin-mdx#47 (comment) |
I think we're perhaps moving away from using
After that, (plus setting the builder and adding a |
Hi @IanVS After installing the dependency
Any idea how to fix this? Thank you! :) |
Can you check to be sure that you didn't accidentally end up with version 2 of @mdx-js/mdx somehow?
|
You are right..
So I've tried to override it in my
.. but this leads to:
|
It seems like this only happens when you are on React 18? |
Can confirm on |
You are right. I've just tested it again and it seems to work now. |
But on the other hand it's problematic when it comes to |
My project does not use React (though Storybook is written in React). I would expect internal dependencies to be resolved by Storybook and its ecosystem of packages before release (I chose Storybook@6.5.4). As as user, I should not care about React version if I don't use it directly and would expect it to work out of the box. When I run into these errors, I look at Storybook as a broken project and start a search for alternatives. |
This is a bug, for sure. React 18 and MDX2 threw things for a bit of a loop, and we're still finding a way to fix it. There's a workaround for now, and we should have a proper fix before too long. |
@IanVS Yes, understand completely. I hope it didn't come too strong. I was simply looking at it from the point of view of someone who might take Storybook for a spin in a project built with Vite. I just sent a starter project with what seemed to me as straightforward dependencies to a friend so he could test Storybook with pure HTML. It worked on my machine when I initiated it with I imagine my friend to be totally frustrated. My package.json
|
@IanVS There was a missing dep in https://github.com/storybookjs/mdx1-csf/releases/tag/v0.0.2 |
Right now we're not using |
same error. 😵💫 |
Fixes #234 Fixes #391 Fixes #398 To enable experimental MDX2 in a project, follow this guide: https://gist.github.com/shilman/6ff2d7e18db8846e8fc552fb432ae4f6 * Support MDXv2 * Fix formatting * Remove explicit mdx-js/preact from example * Remove workarounds from readme * Add @storybook/mdx2-csf to examples using it Co-authored-by: Ian VanSchooten <ian.vanschooten@gmail.com>
I am having this error, even though I don't use React or Preact, neither do I use MDX. |
What version of
vite
are you using?2.9.9
System info and storybook versions
System:
OS: macOS 12.3.1
CPU: (10) arm64 Apple M1 Pro
Binaries:
Node: 18.0.0 - /opt/homebrew/bin/node
npm: 8.9.0 - /opt/homebrew/bin/npm
Browsers:
Chrome: 101.0.4951.64
Firefox: 100.0
Safari: 15.4
npmPackages:
@storybook/addon-actions: ^6.5.3 => 6.5.3
@storybook/addon-essentials: ^6.5.3 => 6.5.3
@storybook/addon-interactions: ^6.5.3 => 6.5.3
@storybook/addon-links: ^6.5.3 => 6.5.3
@storybook/builder-vite: ^0.1.35 => 0.1.35
@storybook/builder-webpack4: ^6.5.3 => 6.5.3
@storybook/manager-webpack4: ^6.5.3 => 6.5.3
@storybook/svelte: ^6.5.3 => 6.5.3
@storybook/testing-library: ^0.0.11 => 0.0.11
Describe the Bug
Created a scratch project with Sveltekit(1.0.0-next.335), storybook (6.5.3) and builder-vite.
This project with webpack works fine.
But when starting storybook, I'm presented with the following error:
Link to Minimal Reproducible Example
https://github.com/GeForcez/storybook-load-API-data-via-loaders
Participation
The text was updated successfully, but these errors were encountered: