5

When starting yarn for my docusaurus 2 website, I see that the website is running on a local host (http://localhost:3000/). However, I noticed that there was an Unterminated JSX contents error. Despite the markdown being correct.

This is the error that appears:

  76 | </li>
  77 | </ul>
> 78 |     </MDXLayout>
     |                 ^
  79 |   )
  80 | };
  81 | MDXContent.isMDXComponent = true
Yangshun Tay
  • 49,270
  • 33
  • 114
  • 141
KenD
  • 51
  • 2

1 Answers1

6

It's hard for me to help without looking at the code. But I recommend looking for unterminated <img> or <br> tags. They are valid in HTML but not JSX. Your markup has to be JSX-compliant now that we are writing MDX (Markdown + JSX).

Yangshun Tay
  • 49,270
  • 33
  • 114
  • 141
  • I'm using MarkText as editor, when using the align option for images, the editor changes from `!(text)[link]` to ``. When I closed all images with `<\img>` tag, the site compiled successfully. – Oshio Feb 16 '21 at 05:10