# invalid_package

> The registry rejected the uploaded archive and listed the problems it found.

| | |
| --- | --- |
| Kind | `disko` command error |
| `disko` exit code | 1 (problems) |

The registry runs the same checks as the local build on every upload. When
the archive fails them, `disko publish` reports `invalid_package`, exits with
code 1 and lists each problem with its own `code`, `message` and `docs` link.
Because `disko` runs the same checks before uploading, this usually means the
CLI and the registry disagree, for example an older `@disko-game/cli`.

```json
{
  "ok": false,
  "command": "publish",
  "error": "invalid_package",
  "message": "the registry rejected the archive; fix the problems below",
  "problems": [
    {
      "code": "module_syntax",
      "path": "main.js",
      "line": 3,
      "column": 1,
      "message": "…",
      "docs": "https://docs.disko.ooo/errors/module_syntax"
    }
  ]
}
```

## Fix

Fix each listed problem, then run `disko publish --dry-run` and
`disko publish` again. If the dry run passes but the registry still rejects the
archive, update `@disko-game/cli` to the latest version. Nothing was stored, so
no version was used up.

## See also

- [build_failed](/errors/build_failed)
- [Error codes](/errors)
