You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
Darter90
changed the title
Support for the experimental syntax 'jsx' isn't currently enabled (solution)
Support for the experimental syntax 'jsx' isn't currently enabled (with solution)
Mar 16, 2021
I ended up the second book chapter; when I tried to launch
npm run watch
, Babel throw this error:Support for the experimental syntax 'jsx' isn't currently enabled
To solve this, you have to:
add this dependency to your package.json:
"@babel/preset-env": "^7.12.13" <--- same version of @babel/preset-react
Launch npm install. Those are my dependencies at this point:
Subsequently, you have to change Babel's configuration settings.
You can do it with an external file
At the root folder of your project (where package.json is located), create a new file named "babel.config.js" and add those lines:
When I tried to launch again npm run watch, the issue was gone.
Original solution:
https://stackoverflow.com/questions/62703393/support-for-the-experimental-jsx-isnt-currently-enabled
The text was updated successfully, but these errors were encountered: