# TS17004: Cannot use JSX unless the '--jsx' flag is provided.

> A file contains JSX but the `jsx` compiler option isn't set. Set `jsx` in tsconfig.json.

## What it means

JSX in a `.tsx` file needs to know how it will be compiled, so the `jsx` option is required.
Without it every JSX element is reported with this code. On a real React project this can be
the most frequent error when tsconfig.json is missing the option.

## Example

```tsx
export const el = <div />;
```

## How to fix

- Set `"jsx": "react-jsx"` (React 17+), `"preserve"` (another tool transforms JSX) or the
  value your framework documents.

Source: https://ts-r.dev/errors/TS17004/
