docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
Got "MDX compilation failed for generated file"
Describe the bug
Hello I create a sample of new empty Docusaurus project with command
npx create-docusaurus@latest my-website classic
The docusaurus dependencies after install are:
"@docusaurus/core": "3.5.2",
"@docusaurus/preset-classic": "3.5.2",
I add docusaurus-openapi-docs library, and compile my new swagger file into docs folder.
Here are the openapi-docs versions:
"docusaurus-plugin-openapi-docs": "^2.2.4",
"docusaurus-preset-openapi": "^0.7.5",
"docusaurus-theme-openapi-docs": "^2.2.4",
The config of plugins here, in docusaurus.config.js:
[
'docusaurus-plugin-openapi-docs',
{
docsPluginId: 'api',
id: "api",
config: {
dbaas: {
specPath: "swagger/dbaas.yaml",
outputDir: "docs/api/dbaas",
sidebarOptions: {
groupPathsBy: "tagGroup",
},
},
}
},
]
And then I generate document files via:
yarn docusaurus gen-api-docs all
Current behavior
After generate all documents, I have faced the error when compiling the project due to MDX file error.
Error: MDX compilation failed for file "/home/{username}/utils/test/docs/api/dbaas/list-articles.api.mdx"
Cause: Expected a closing tag for `<div>` (37:754-37:759) before the end of `paragraph`
another error
Module not found: Error: Can't resolve '@theme/ApiLogo' in '/home/{username}/utils/test/docs/api/dbaas'
--------------------------
Module not found: Error: Can't resolve '@theme/SchemaTabs' in '/home/{username}/utils/test/docs/api/dbaas'
--------------------------
Module not found: Error: Can't resolve '@theme/ApiExplorer/Export' in '/home/{username}/utils/test/docs/api/dbaas'
--------------------------
Here is the image of error

Your Environment
- Version used: ^2.2.4
- Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
- Operating System and version (desktop or mobile):
- Link to your project: https://github.com/tulu1688/docusaurus-api-docs