> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Bach builds Windows installers from one bach.toml with the bach command: bach init, bach check, bach preview, bach build. Installs are per user and need no administrator rights by default. installer.scope = "machine" installs for every user after one Windows prompt. On Windows, run setup files with Start-Process -Wait -PassThru in PowerShell, and give signtool arguments that start with the word sign.

# Why won't my config build?

> Fix the errors bach check and bach build report: invalid settings, TOML syntax, secrets in the build folder, runtime download problems and more.

When `bach check` or `bach build` stops, the message names what's wrong. This page explains the common ones.

Run `bach check` after each fix; it's faster than building.

## "bach.toml isn't valid"

The line after it says why:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
error: bach.toml isn't valid.
  app.executable is "hello.exe", but there's no such file or app in build (or it's excluded).
```

The sentence starts with the setting, here `app.executable`. Fix that setting. See [Missing files](/docs/troubleshooting/missing-files.md) for this one.

## "unknown field"

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
unknown field `excutable`, expected one of `name`, `version`, `publisher`, `executable`, `id`, `description`, `website`, `icon`.
```

A setting is misspelled or in the wrong section. The message lists the settings that section knows. Look up the section in the [configuration reference](/docs/reference/config/overview.md).

## "TOML parse error"

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
error: TOML parse error at line 5, column 14
5 | executable = hello-notes.exe
string values must be quoted, expected literal string.
```

The file isn't valid TOML. Go to the line and column shown. Common causes: text without quotes, or a Windows path in double quotes. Use single quotes for paths: `'C:\Tools\app'`.

## "files.source holds ..., an environment file with credentials"

A file that looks like a secret is in your build folder. If it shouldn't ship, add it to `files.exclude`, or better, keep it out of the build folder. If it must ship, name it in `files.allow_secrets`. See [Choose files](/docs/guides/choose-files.md#files-that-look-like-secrets-stop-the-build).

## "... is a symbolic link"

Windows builds only package real files. Copy the files instead of linking them.

## "... would replace the uninstaller Bach adds"

Your build folder has a file called `uninstall.exe` at the top. Rename it, or exclude it.

## "couldn't replace ... (is it open?)"

The setup file from an earlier build is running, or something holds it. Close it and build again.

## The setup program can't be downloaded

On macOS and Linux, or with a `bach` installed without `bach-setup.exe` next to it, the first build downloads it from GitHub. If that fails (no network, a proxy, or `BACH_NO_DOWNLOAD`):

1. Download the Windows zip for the same version from the [releases page](https://github.com/usebach/bach/releases).
2. Pass the file: `bach build --runtime path/to/bach-setup.exe`, or set `BACH_RUNTIME`.

`bach doctor` shows which one is used.

## Warnings fail my CI build

With `--strict` or `BACH_STRICT=1`, any warning stops the build. Fix the warnings that `bach check` prints, or remove `--strict`.

## --sign fails

* "`--sign` was given, but bach.toml has no \[signing] section": add [`[signing]`](/docs/reference/config/signing).
* signtool says no certificates were found: your certificate isn't where signtool looks. See [Signing](/docs/guides/signing.md).
* "signing.arguments for signtool must start with the word sign": add `sign` at the start.

## "installed Macs would refuse it as an update"

Your Mac certificate doesn't match `[updates] signer`, so people who already have your app couldn't update to this file. Set `[macos.signing] identity` to that publisher's Developer ID Application certificate and build with `--sign`, or change `[updates] signer`. See [Protect your updates](/docs/guides/update-security.md#on-a-mac).

## Check that it's fixed

`bach check` ends without errors and prints what would be installed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.