> ## Documentation Index
> Fetch the complete documentation index at: https://stars-components.js.org/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Errors

> Diagnostic codes reported by the stars CLI.

The `stars` CLI reports every failure as a structured diagnostic: a stable code, a short explanation of why it
happened, and — when there's something you can do about it — a concrete fix. This page documents every code
`@wolfstar/cli` can raise on its own; `stars.config.*` loading and validation errors are documented separately under
[Configuration Errors](/documentation/errors/config).

## Exit codes

| Exit code | Meaning                                                                            |
| --------- | ---------------------------------------------------------------------------------- |
| `0`       | Success                                                                            |
| `1`       | Generic error                                                                      |
| `2`       | Invalid `stars.config.*` (any [configuration error](/documentation/errors/config)) |
| `3`       | `BUILD_FAILED`                                                                     |
| `130`     | Interrupted (`Ctrl+C`)                                                             |
| `143`     | Terminated                                                                         |

<h2 id="prepare_outdated">
  PREPARE\_OUTDATED
</h2>

The generated project files are out of date.

**Fix:** run `stars prepare` to update them.

<h2 id="discord_token_missing">
  DISCORD\_TOKEN\_MISSING
</h2>

`DISCORD_TOKEN` is not set.

**Fix:** set `DISCORD_TOKEN` in the environment or in the project's `.env` file.

<h2 id="discord_application_id_missing">
  DISCORD\_APPLICATION\_ID\_MISSING
</h2>

The Discord application id is not set.

**Fix:** set `DISCORD_APPLICATION_ID` (or `APPLICATION_ID`) in the environment or in the project's `.env` file.

<h2 id="discord_request_failed">
  DISCORD\_REQUEST\_FAILED
</h2>

Discord answered with an error status while the CLI was calling the Discord API (for example while pushing or
listing commands).

**Fix:** a `401` status means the token is wrong — check `DISCORD_TOKEN`. Any other status means the application id
or the bot's permissions are wrong.

<h2 id="build_failed">
  BUILD\_FAILED
</h2>

The build step failed, optionally with the underlying build tool's own error message attached. This is the one CLI
error with its own exit code: `3`.

<h2 id="command_not_found">
  COMMAND\_NOT\_FOUND
</h2>

No deployed command matches the name(s) passed to `stars commands`.

**Fix:** run `stars commands list` to see what's currently deployed.

<h2 id="aborted">
  ABORTED
</h2>

An interactive prompt was cancelled.

<h2 id="confirmation_required">
  CONFIRMATION\_REQUIRED
</h2>

`stars commands delete` refuses to delete commands without an explicit confirmation.

**Fix:** pass `--yes` to delete them without prompting, or `--name` to pick a single command, when running from a
script.

<h2 id="invalid_theme">
  INVALID\_THEME
</h2>

`stars dev` was given a theme it doesn't know.

**Fix:** use one of the themes it lists as available.

<h2 id="codegen_outdated">
  CODEGEN\_OUTDATED
</h2>

Generated files (i18n types, etc.) are out of date.

**Fix:** run `stars codegen` to update them.

<h2 id="dependency_missing">
  DEPENDENCY\_MISSING
</h2>

A dependency the current configuration needs (for example `tsdown` or `vite`) isn't installed in the project root.

**Fix:** the message names the missing package and where to install it.

<h2 id="codegen_failed">
  CODEGEN\_FAILED
</h2>

`i18next-type-generator` exited with a non-zero code, optionally with its `stderr` output attached.

<h2 id="experiment_unavailable">
  EXPERIMENT\_UNAVAILABLE
</h2>

`experimental.enableNitro` is not implemented yet.

**Fix:** Nitro needs the framework's Fetch adapter
([wolfstar-project/stars-components#81](https://github.com/wolfstar-project/stars-components/issues/81)); until it
lands, set `build.tool` to `'tsdown'`, `'vite'`, or `'tsc'`.
