Topic: "MDB React Element" has no corresponding closing tag

bgining2this free asked 4 years ago

Expected.- No syntax errors in Visual Studio Code.

Current.- Multiple syntax errors in MDBReact complaining that several elements have no closing tag when it is present.

enter image description here

chiok zechariah free commented 3 years ago

I have the same issue, how can I solve these ? thank you!

Krzysztof Wilk staff commented 3 years ago


Did you try the solution below?

Keep coding!

Piotr Glejzer staff answered 4 years ago

Hello bgining2this,

I recommend installing prettier plugin.

and this errors happens because you are putting a jsxcode to js file and Visual Studio Code doesn't recognize that. There are a few ways to fix this problem. The easiest way is to change a file extension to .jsx instead .js and set to setting format on save to true in VSC.

The next solution is that you can change Select Language Mode in VSC ( right bottom corner ) and also set to format on save.

or you can set globally to recognize .jsx but you have to change settings with prettier like this. .


Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.21.0
  • Device: Desktop
  • Browser: Chromium, Opera
  • OS: Arch Linux
  • Provided sample code: No
  • Provided link: No