docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
MDX compilation fails with Docusaurus v3
Describe the bug
Error: MDX compilation failed for file "<redacted>"
Cause: Expected a closing tag for `<div>` (30:1951-30:1956) before the end of `paragraph`
Details:
{
"name": "30:1-30:1956",
"message": "Expected a closing tag for `<div>` (30:1951-30:1956) before the end of `paragraph`",
"reason": "Expected a closing tag for `<div>` (30:1951-30:1956) before the end of `paragraph`",
"line": 30,
"column": 1,
"position": {
"start": {
"line": 30,
"column": 1,
"offset": 1584,
"_index": 0,
"_bufferIndex": 0
},
"end": {
"line": 30,
"column": 1956,
"offset": 3539,
"_index": 1,
"_bufferIndex": -1
}
},
"source": "mdast-util-mdx-jsx",
"ruleId": "end-tag-mismatch"
}
Expected behavior
Successful compilation
Current behavior
MDX compilation fails
Possible solution
Steps to reproduce
- Update Docusaurus package versions in
package.json
to3.0.0-alpha.0
-
yarn
-
yarn build
Context
Just testing the brand-new Docusaurus v3 alpha for now to find potential migration issues, but would like to upgrade later when v3 enters beta or has a stable release.
Your Environment
- Version used:
0.0.0-beta.660
@sserrata See https://github.com/facebook/docusaurus/discussions/9053#discussioncomment-6304912 for an explanation of the issue. I suspect adding newlines throughout would resolve this problem?
Additionally, {
, <
, and >
characters in descriptions need to be escaped as {'{'}
, {'<'}
, and {'>'}
, respectively.