Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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

bgining2this free asked 5 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

Hi!

Did you try the solution below?

Keep coding!


Piotr Glejzer staff answered 5 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 https://prettier.io/blog/2017/08/29/1.6.0.html like this. .

Best,
Piotr



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

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