Latest version of Gatsby is throwing error - Support for the experimental syntax 'jsx' isn't currently enabled
See original GitHub issueDescription
Gatsby installed - "gatsby": "^2.24.47",
SyntaxError: node_modules\gatsby\cache-dir\gatsby-browser-entry.js: Support for the experimental syntax ‘jsx’ isn’t currently enabled
Steps to reproduce
- Install Gatsby
npm i gatsby
npm start
Expected result
It should compile as expected and I can use gatsby
Actual result
Environment
I couldn’t run gatsby info even after installing the cli. I don’t know whats going on., but here are the dependencies in my package.json
"dependencies": {
"@fortawesome/fontawesome": "^1.1.8",
"@fortawesome/fontawesome-svg-core": "^1.2.30",
"@fortawesome/free-solid-svg-icons": "^5.14.0",
"@fortawesome/react-fontawesome": "^0.1.11",
"bootstrap": "^4.5.2",
"core-util-is": "^1.0.2",
"font-awesome": "^4.7.0",
"fontawesome": "^5.6.3",
"gatsby": "^2.24.47",
"gatsby-cli": "^2.12.87",
"gatsby-source-notionso": "^1.1.6",
"react": "^16.13.1",
"react-addons-css-transition-group": "^15.6.2",
"react-dom": "^16.13.1",
"react-goodreads": "^1.0.8",
"react-router-dom": "^5.2.0",
"react-scripts": "3.0.1",
"reactstrap": "^8.5.1"
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Support for the experimental syntax 'jsx' isn't currently enabled
I got this error when try to run a project in a command prompt at a ... Support for the experimental syntax 'jsx'...
Read more >babel/preset-react
Note: Flow syntax support is no longer enabled in v7. For that, you will ... Toggles whether or not to throw an error...
Read more >How to enable support for the experimental syntax 'jsx'?-babel.js
Coding example for the question Gatsby + Jest - How to enable support for the experimental syntax 'jsx'?-babel.js.
Read more >JSX - Gatsby
JSX is an XML-like syntax extension for JavaScript that's used to create React components. It's the recommended way to create components, and a...
Read more >support for the experimental syntax 'jsx' isn't currently enabled
in babel.config.js file module.exports = { presets: ['@babel/preset-env', '@babel/preset-react'], }
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m getting this same error in a Gatsby project of mine right now.
It just started right after updating my NPM version to the latest. That’s all I’ve done, no changes to the project and it was just working before the NPM update.
This is the console log right before the error I get when running
gatsby develop
:When doing a production build with
gatsby build
I get a more descriptive error:Here’s my dependencies:
any solution?