docs: Specify MDX version to install
See original GitHub issueServer Error
Error: require() of ES Module C:\Users\ARYAN\Desktop\itsaryan\node_modules\@mdx-js\react\index.js from C:\Users\ARYAN\Desktop\itsaryan\node_modules\@theme-ui\mdx\dist\theme-ui-mdx.cjs.dev.js not supported. Instead change the require of index.js in C:\Users\ARYAN\Desktop\itsaryan\node_modules\@theme-ui\mdx\dist\theme-ui-mdx.cjs.dev.js to a dynamic import() which is available in all CommonJS modules.
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Getting started - MDX
Install and configure the webpack loader @mdx-js/loader . Configure your JSX runtime depending on which one you use (React, Preact, Vue, etc.).
Read more >Installing the MDX Toolkit - Citrix Product Documentation
Locate the MDX Toolkit version you want to install and then click its link to begin the download. Open MDXToolkit.
Read more >MDX Format - Storybook - JS.ORG
MDX Format. MDX is the syntax Storybook Docs uses to capture long-form Markdown documentation and stories in one file. You can also write...
Read more >Adding MDX Pages | Gatsby
Importing JSX components into MDX documents; Importing MDX files into JSX ... npm install gatsby-plugin-mdx gatsby-source-filesystem @mdx-js/react.
Read more >MDX and React - Docusaurus
This is unreleased documentation for Docusaurus Canary version. ... To define any custom component within an MDX file, you have to export ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you please update the documentation in the ReadMe and on the website so that the info reflects installing mdx-js/react v1? This project is used in a popular, but older tutorial that’s causing some headaches for newbies.
npm install theme-ui @emotion/react @mdx-js/react@1
For yarn:
yarn add theme-ui @emotion/react @mdx-js/react@1
Yep, unfortunately this is a known issue, we just haven’t figured out the resolution: https://github.com/system-ui/theme-ui/issues/2023
We don’t yet support MDX v2, which was recently released. The fix is to downgrade
@mdx-js/react
to the latest version of v1, & you should be good to go.