You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Next 3 libraries latest version doesn't work with docusaurus.
Library
Old version
New version
@mdx-js-react
1.6.22
2.3.0
rehype-katex
5
6
remark-math
3
5
@mdx-js-react
latest version occurs error as shown below
(0 , _mdx_js_react__WEBPACK_IMPORTED_MODULE_2__.mdx) is not a function
rehyle-katex, remark-math
Error
[ERROR] Error [ERR_REQUIRE_ESM]: require() of ES Module[USER-PATH]\node_modules\remark-math\index.js from [USER-PATH]\docusaurus.config.js not supported.
Instead change the require of index.js in [USER-PATH]\docusaurus\docusaurus.config.js to a dynamic import() which is available in all CommonJS modules.
Cause
Currently, docusaurus must use rehyle-katex@5 and remark-math@3 since those are only supporting ESM but docusaurus doesn't do it.
Use the exact same versions. The latest versions are incompatible with Docusaurus 2. - docusaurus document
Docusaurus has built-in support for MDX v1, which allows you to write JSX within your Markdown files and render them as React components. - docusaurus document
🔑 Solution
Use old version and wait until docusaurus or those support compatibility either.
🔒 Problem
Next 3 libraries latest version doesn't work with docusaurus.
@mdx-js-react
latest version occurs error as shown below
rehyle-katex, remark-math
Error
Cause
Currently, docusaurus must use rehyle-katex@5 and remark-math@3 since those are only supporting ESM but docusaurus doesn't do it.
🔑 Solution
Use old version and wait until docusaurus or those support compatibility either.
🔗 Reference
The text was updated successfully, but these errors were encountered: