close

[Solved] SyntaxError: Support for the experimental syntax ‘jsx’ isn’t currently enabled

Hello Guys, How are you all? Hope You all Are Fine. Today I am running very simple code But still I am facing the following error SyntaxError: Support for the experimental syntax ‘jsx’ isn’t currently enabled in ReactJs. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How SyntaxError: Support for the experimental syntax ‘jsx’ isn’t currently enabled Error Occurs ?

How To Solve SyntaxError: Support for the experimental syntax ‘jsx’ isn’t currently enabled Error ?

  1. How To Solve SyntaxError: Support for the experimental syntax ‘jsx’ isn’t currently enabled Error?

    To Solve SyntaxError: Support for the experimental syntax ‘jsx’ isn’t currently enabled Error A simple and Easy solution is Just to create a .babelrc file and add this line in .babelrc file.

  2. SyntaxError: Support for the experimental syntax ‘jsx’ isn’t currently enabled

    To Solve SyntaxError: Support for the experimental syntax ‘jsx’ isn’t currently enabled Error A simple and Easy solution is Just to create a .babelrc file and add this line in .babelrc file.

Solution 1: create a .babelrc file

A simple and Easy solution is Just to create a .babelrc file and add this line in .babelrc file.

{
  "presets": ["@babel/preset-env", "@babel/preset-react"]
}

Solution 2: Create babel.config.js

Just Create babel.config.js and add this content to it.

module.exports = {
    presets:[
        "@babel/preset-env",
        "@babel/preset-react"
    ]
}

Solution 3: Set babelrc: true

  1. Just open node_modules/react-scripts/config/webpack.config.js
  2. set babelrc: true
  3. Now your error should be solved.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

1 thought on “[Solved] SyntaxError: Support for the experimental syntax ‘jsx’ isn’t currently enabled”

Leave a Comment