-
Notifications
You must be signed in to change notification settings - Fork 107
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] Error: [vite-plugin-mdx] "@mdx-js/preact" must be installed #406
Comments
This looks to be related to #391. Unfortunately we're in a transitional period with mdx1 and mdx2, and still finding a good way to support them both. The workaround of installing the package manually is your best bet for now. |
I'm having this issue because in my monorepo (yarn workspace + turbo) one of my packages uses a package that has preact, that makes it try to require If I remove all references to Preact from my monorepo, everything works. I think here is where that decision is made Can there be a configuration option to override that? |
Hmmmm, @giannif could you try using |
@IanVS great idea, works, thanks! |
Is there a way to disable mdx support at the dependency level? We don't plan to use it anyway |
Sorry, I don't know of a way to avoid installing mdx dependencies. It's baked into storybook for use in the |
Thanks, I'll close this issue for now since there is a workaround already |
What version of
vite
are you using?0.1.36
System info and storybook versions
System:
OS: Linux 5.17 Fedora Linux 36 (Workstation Edition)
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Binaries:
Node: 17.8.0 - /opt/tools/node/bin/node
Yarn: 1.22.18 - /opt/tools/node/bin/yarn
npm: 8.9.0 - /opt/clients/camino/camino/node_modules/.bin/npm
Browsers:
Chrome: 101.0.4951.64
Firefox: 100.0
Describe the Bug
I think this transitive dependency is problematic, because I don't even use mdx for my storybooks.
I have to install it manually
Link to Minimal Reproducible Example
No response
Participation
The text was updated successfully, but these errors were encountered: