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 ?
- Solution 1: create a
.babelrc
file - Solution 2: Create babel.config.js
- Solution 3: Set babelrc: true
- Summery
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 ?
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.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
- Just open node_modules/react-scripts/config/webpack.config.js
- set
babelrc: true
- 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
Yup, setting babelrc to true was the ticket to ride.
Thank you!!