question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docs: Specify MDX version to install

See original GitHub issue

Server 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.

Screenshot 2022-02-13 191552

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
jacksonbrimcommented, May 13, 2022

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

4reactions
lachlanjccommented, Feb 13, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found