> ## 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.

# Configuration Errors

> Diagnostic codes for stars.config.* loading and validation failures.

Every way `stars.config.*` can fail to load or validate is a structured diagnostic exported from
`@wolfstar/http-framework/config` as `configDiagnostics`. `@wolfstar/cli` renders these the same way as its own
[CLI errors](/documentation/errors/cli) and exits with code `2` for all of them.

<h2 id="root_not_found">
  ROOT\_NOT\_FOUND
</h2>

The project root does not exist.

**Fix:** point `root` to an existing directory, relative to the configuration file.

<h2 id="package_json_invalid">
  PACKAGE\_JSON\_INVALID
</h2>

The project's `package.json` failed to parse.

**Fix:** fix the JSON syntax of the `package.json` file.

<h2 id="entry_not_found">
  ENTRY\_NOT\_FOUND
</h2>

The `entry` file does not exist.

**Fix:** point `entry` to the file that starts the bot, relative to the project root.

<h2 id="entry_default_not_found">
  ENTRY\_DEFAULT\_NOT\_FOUND
</h2>

Could not find an entry file in the project root under any of the default names.

**Fix:** set `entry` in the configuration, or create one of the default entry files.

<h2 id="invalid_build_tool">
  INVALID\_BUILD\_TOOL
</h2>

`build.tool` is set to an unknown value.

**Fix:** use one of `'tsdown'`, `'tsc'`, `'vite'`, `'none'` or `'auto'`.

<h2 id="experimental_build_tool">
  EXPERIMENTAL\_BUILD\_TOOL
</h2>

The selected build tool is experimental.

**Fix:** set the matching `experimental.*` flag to `true` to opt in.

<h2 id="build_tool_required">
  BUILD\_TOOL\_REQUIRED
</h2>

The entry file is TypeScript but `build.tool` is `'none'`.

**Fix:** set `build.tool` to `'tsdown'` or `'tsc'`, or point `entry` to a JavaScript file.

<h2 id="tsconfig_explicit_not_found">
  TSCONFIG\_EXPLICIT\_NOT\_FOUND
</h2>

The `tsconfig.json` file pointed to explicitly by the configuration does not exist.

**Fix:** point that option to an existing `tsconfig.json`, relative to the project root.

<h2 id="tsconfig_not_found">
  TSCONFIG\_NOT\_FOUND
</h2>

Could not find a `tsconfig.json` in the project root.

**Fix:** create `src/tsconfig.json` or `tsconfig.json`, or set the suggested option explicitly.

<h2 id="tsdown_options_require_tsdown">
  TSDOWN\_OPTIONS\_REQUIRE\_TSDOWN
</h2>

`tsdown` options were set but `build.tool` isn't `'tsdown'`.

**Fix:** set `build.tool` to `'tsdown'`, or remove the `tsdown` options.

<h2 id="vite_options_require_vite">
  VITE\_OPTIONS\_REQUIRE\_VITE
</h2>

`vite` options were set but `build.tool` isn't `'vite'`.

**Fix:** set `build.tool` to `'vite'` with `experimental.enableVite`, or remove the `vite` options.

<h2 id="tsdown_config_file_unsupported">
  TSDOWN\_CONFIG\_FILE\_UNSUPPORTED
</h2>

A `tsdown` config file exists but isn't used at the project's current compatibility version.

**Fix:** move its options into the `tsdown` configuration option, drop the config file, or lower
`future.compatibilityVersion` to the legacy version.

<h2 id="invalid_type">
  INVALID\_TYPE
</h2>

An option was set to a value of the wrong type.

**Fix:** the message names the option, the type it expects, and the value it actually received.

<h2 id="invalid_compatibility_version">
  INVALID\_COMPATIBILITY\_VERSION
</h2>

`future.compatibilityVersion` is set to an unknown version.

**Fix:** use the legacy compatibility version for the legacy build pipeline, or the latest version for today's
defaults.

<h2 id="unknown_option">
  UNKNOWN\_OPTION
</h2>

The configuration contains an option name `@wolfstar/http-framework` doesn't recognize.

**Fix:** the message lists the known options for that section — check for a typo.

<h2 id="experiment_required">
  EXPERIMENT\_REQUIRED
</h2>

An option needs an `experimental.*` flag that isn't set.

**Fix:** set the required flag to `true` as well, or drop the option that needs it.

<h2 id="imports_require_tsdown">
  IMPORTS\_REQUIRE\_TSDOWN
</h2>

`imports` was set but `build.tool` isn't `'tsdown'`.

**Fix:** set `build.tool` to `'tsdown'`, or remove `imports` (or set it to `false`).

<h2 id="locales_not_found">
  LOCALES\_NOT\_FOUND
</h2>

`codegen.i18n.locales` points to a directory that does not exist.

**Fix:** point it to the base locale directory, relative to the project root.

<h2 id="invalid_url">
  INVALID\_URL
</h2>

An option that expects a URL received a value that isn't a valid URL.

**Fix:** the message includes what a valid value looks like for that option.

<h2 id="tunnel_url_not_https">
  TUNNEL\_URL\_NOT\_HTTPS
</h2>

The tunnel URL isn't `https`.

**Fix:** Discord only accepts an `https` interactions endpoint.

<h2 id="invalid_typechecker">
  INVALID\_TYPECHECKER
</h2>

The configured type checker is set to an unknown value.

**Fix:** use one of `'tsc'`, `'golar'`, `'tsz'` or `'auto'`.

<h2 id="config_not_found">
  CONFIG\_NOT\_FOUND
</h2>

No `stars.config.*` file was found.

**Fix:** pass an existing file to `--config`, or create one of the recognized config file names in the current
directory.

<h2 id="config_load_failed">
  CONFIG\_LOAD\_FAILED
</h2>

The configuration file failed to load.

**Fix:** the file must be valid TypeScript/JavaScript and export the configuration as its default export.

<h2 id="config_not_object">
  CONFIG\_NOT\_OBJECT
</h2>

The configuration file's default export isn't an object.

**Fix:** use `export default defineConfig({ ... })` from `@wolfstar/http-framework/config`.
