# module_syntax

> A module does not parse as an ECMAScript 2023 module.

A module does not parse as an ECMAScript 2023 module.

| | |
| --- | --- |
| Kind | Build or validation problem |
| Reported by | Archive and source validation |
| `disko` exit code | 1 (problems) |

A module does not parse as an ECMAScript 2023 module. The problem gives the
line and column of the first error in the file.

## Why it happens

- An ordinary syntax error, such as a missing bracket.
- CommonJS habits that are invalid in strict-mode modules, such as `with` or
  octal literals like `010`.
- Syntax newer than ECMAScript 2023 in `.js` files: decorators, `using`
  declarations, `accessor` class fields, the regular expression `v` flag, or
  `import source` / `import defer`.
- JSX, which is not JavaScript.

## Wrong

```js title="src/main.js"
@sealed
class Ball {}
```

## Right

```js title="src/main.js"
class Ball {}
Object.seal(Ball);
```

## See also

- [Project structure & imports](/games/project-structure)
- [`module_encoding`](/errors/module_encoding)
