gastownhall/beads · error
missing required variables: %s
Error message
missing required variables: %s
What it means
Molecule templates (subgraphs) can declare required variables. checkRequiredVars compares the supplied vars map against extractRequiredVariables(subgraph) and fails creation when any required variable is absent, listing all missing names comma-separated.
Source
Thrown at cmd/bd/wisp.go:302
Prefix: types.IDPrefixWisp,
RootOnly: rootOnly,
})
if err != nil {
return HandleError("creating wisp: %v", err)
}
return renderWispCreateResult(result)
}
func checkRequiredVars(subgraph *TemplateSubgraph, vars map[string]string) error {
var missingVars []string
for _, v := range extractRequiredVariables(subgraph) {
if _, ok := vars[v]; !ok {
missingVars = append(missingVars, v)
}
}
if len(missingVars) > 0 {
return fmt.Errorf("missing required variables: %s", strings.Join(missingVars, ", "))
}
return nil
}
func firstMissingVar(subgraph *TemplateSubgraph, vars map[string]string) string {
for _, v := range extractRequiredVariables(subgraph) {
if _, ok := vars[v]; !ok {
return v
}
}
return ""
}
func renderWispCreateDryRun(protoID string, subgraph *TemplateSubgraph, vars map[string]string, rootOnly bool) {
if rootOnly {
skipped := len(subgraph.Issues) - 1
fmt.Printf("\nDry run: would create wisp with 1 issue (root only) from proto %s\n", protoID)
if skipped > 0 {View on GitHub (pinned to 71377f2769)
Solutions
- Read the error's list and pass each variable: --var name=value
- Run with --dry-run or check the proto template to see all required variables
- Fix variable-name typos in your script or command
Example fix
// before bd mol pour deploy-proto // after bd mol pour deploy-proto --var env=prod --var region=us-east
Defensive patterns
Strategy: validation
Validate before calling
required := extractRequiredVariables(subgraph)
var missing []string
for _, v := range required {
if _, ok := vars[v]; !ok {
missing = append(missing, v)
}
}
if len(missing) > 0 {
return fmt.Errorf("missing required variables: %s", strings.Join(missing, ", "))
} Prevention
- List required variables with a dry run before pouring
- Keep --var names in sync with template updates
- Validate variable names in CI scripts that invoke pour
When it happens
Trigger: `bd mol pour <name>` / wisp create without the required --var key=value pairs (or vars passed programmatically) for a proto whose template references those variables.
Common situations: Forgetting a newly added template variable after a proto update; typos in variable names (--var timout=5 vs timeout=5); running pour from scripts with incomplete env-derived vars.
Related errors
- got %d close reasons for %d issue IDs; provide exactly one s
- cannot specify both --reason-file and --reason/--resolution/
- --reason-file %q is empty; close reason is required
- invalid mode '%s', must be 'compile' or 'runtime'
- runtime mode requires all variables to have values Missing:
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/70c0ae4ce9cea86e.
Report an issue: GitHub.