Babel "Support for the experimental syntax ... isn't currently enabled" in CI
Babel parses with only the syntax plugins you enable. When code uses a proposal or framework syntax (JSX, decorators, class properties) without the matching plugin or preset, Babel throws "isn't currently enabled" and names the plugin to add.
What this error means
The build fails with "Support for the experimental syntax 'jsx' isn't currently enabled" (or 'decorators', 'classProperties') and suggests a plugin.
SyntaxError: /src/App.js: Support for the experimental syntax 'jsx' isn't
currently enabled (5:10):
Add @babel/preset-react to the 'presets' section of your Babel config to enable
transformation.Common causes
The required preset or plugin is not configured
JSX needs @babel/preset-react, TypeScript needs @babel/preset-typescript, and proposals need their syntax plugins; without them Babel cannot parse the file.
The plugin is installed but not listed in config
Having the package in node_modules is not enough; it must appear in the presets/plugins arrays for Babel to use it.
How to fix it
Add the suggested preset or plugin
- Read which plugin or preset the error names.
- Install it and add it to the Babel config.
- Re-run the build.
npm install --save-dev @babel/preset-reactRegister it in the Babel config
List the preset so Babel enables the syntax during parse.
// babel.config.js
module.exports = { presets: ['@babel/preset-env', '@babel/preset-react'] };How to prevent it
- Enable the presets your syntax requires (react, typescript, proposals).
- Add both the package and its config entry, not just one.
- Build with Babel in CI so missing syntax support fails the PR.