Skip to content
Latchkey

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.

babel
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

  1. Read which plugin or preset the error names.
  2. Install it and add it to the Babel config.
  3. Re-run the build.
Terminal
npm install --save-dev @babel/preset-react

Register it in the Babel config

List the preset so Babel enables the syntax during parse.

babel.config.js
// 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.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →