air-verse/air · error
entrypoint values must be strings, got %T
Error message
entrypoint values must be strings, got %T
What it means
The custom `entrypoint` TOML unmarshaler accepts a string or an array of strings; if an array element is not a string (e.g. a number or boolean), it returns this error naming the offending Go type. It fails during TOML decoding of the `build.entrypoint` key.
Source
Thrown at runner/config.go:77
Proxy cfgProxy `toml:"proxy"`
}
type entrypoint []string
func (e *entrypoint) UnmarshalTOML(v interface{}) error {
switch val := v.(type) {
case nil:
*e = nil
return nil
case string:
*e = []string{val}
return nil
case []interface{}:
values := make([]string, len(val))
for i, raw := range val {
s, ok := raw.(string)
if !ok {
return fmt.Errorf("entrypoint values must be strings, got %T", raw)
}
values[i] = s
}
*e = values
return nil
default:
return fmt.Errorf("entrypoint must be a string or array of strings, got %T", v)
}
}
func (e entrypoint) binary() string {
if len(e) == 0 {
return ""
}
return e[0]
}
func (e entrypoint) args() []string {View on GitHub (pinned to 71ea1dee05)
Solutions
- Quote every element of the entrypoint array so all are strings
- Use a single string form `entrypoint = "./tmp/main arg"` if simpler
- Run `air init` to see the canonical example format
Example fix
// before (.air.toml) entrypoint = ["./tmp/main", 8080] // after (.air.toml) entrypoint = ["./tmp/main", "8080"]
Defensive patterns
Strategy: validation
Validate before calling
// validate .air.toml entrypoint before running air // entrypoint array elements must all be quoted strings // entrypoint = ["./tmp/main", "8080"] ✓ // entrypoint = ["./tmp/main", 8080] ✗
Prevention
- Quote every entrypoint array element
- Never put bare numbers/booleans in the entrypoint array
- Use entrypoint = "./tmp/main" string form to avoid array typing pitfalls
When it happens
Trigger: A `.air.toml` containing `entrypoint = ["./tmp/main", 8080]` or any array with a non-string element (int, bool, nested array) parsed via UnmarshalTOML.
Common situations: Users putting port numbers or flags without quotes into the entrypoint array, e.g. `entrypoint = ["./tmp/main", 8080]` instead of `["./tmp/main", "8080"]`.
Related errors
- entrypoint must be a string or array of strings, got %T
- configuration already exists
- build.rules[%d] (%s): cmd is required
- build.rules[%d] (%s): at least one of include_dir, include_e
- failed to marshal the default configuration: %w
AI-assisted analysis of air-verse/air@71ea1dee05 (2026-08-31).
Data as JSON: /api/errors/5398b179d65628f8.
Report an issue: GitHub.