Skip to main content
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:
The sentence starts with the setting, here app.executable. Fix that setting. See Missing files for this one.

”unknown field”

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.

”TOML parse error”

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.

”… 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.
  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].
  • signtool says no certificates were found: your certificate isn’t where signtool looks. See Signing.
  • “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.

Check that it’s fixed

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