{"record":{"id":"71344e7737c37248","repo":"GoogleContainerTools/skaffold","slug":"no-tagger-available-for-component-v","errorCode":null,"errorMessage":"no tagger available for component %+v","messagePattern":"no tagger available for component %\\+v","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/tag/custom_template.go","lineNumber":93,"sourceCode":"\t\t\tif _, ok := v.(*customTemplateTagger); ok {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid component specified in custom template: %v\", v)\n\t\t\t}\n\t\t\ttaggers[field] = v\n\t\t\tcontinue\n\t\t}\n\t\tswitch field {\n\t\tcase \"GIT\":\n\t\t\tgitTagger, _ := NewGitCommit(\"\", \"\", false)\n\t\t\ttaggers[field] = gitTagger\n\t\tcase \"DATE\":\n\t\t\ttaggers[field] = NewDateTimeTagger(\"\", \"\")\n\t\tcase \"SHA\":\n\t\t\ttaggers[field] = &ChecksumTagger{}\n\t\tcase \"INPUT_DIGEST\":\n\t\t\tinputDigestTagger, _ := NewInputDigestTagger(t.RunCtx, graph.ToArtifactGraph(t.RunCtx.Artifacts()))\n\t\t\ttaggers[field] = inputDigestTagger\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"no tagger available for component %+v\", field)\n\t\t}\n\t}\n\n\tcustomMap := map[string]string{}\n\tfor k, v := range taggers {\n\t\ttag, err := v.GenerateTag(ctx, image)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"evaluating custom template component: %w\", err)\n\t\t}\n\t\tcustomMap[k] = tag\n\t}\n\treturn customMap, nil\n}\n\n// ParseCustomTemplate is a simple wrapper to parse an custom template.\nfunc ParseCustomTemplate(t string) (*template.Template, error) {\n\treturn template.New(\"customTemplate\").Parse(t)\n}","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/tag/custom_template.go#L75-L111","documentation":"A field found in the custom template has no registered tagger component. `EvaluateComponents` handles known fields (DATE, GIT, SHA, INPUT_DIGEST, LABEL, DIGEST etc.) with a switch; an unknown field falls into `default` and this error names it. Tagging stops because the template cannot be evaluated.","triggerScenarios":"The template string contains a field like `{{.FOO}}` where FOO is neither in `t.Components` nor a recognized built-in component; `GetTemplateFields` extracts it and the switch has no case for it.","commonSituations":"Typo in a component name in skaffold.yaml (e.g. `{{.SH}}` instead of `{{.SHA}}`); template placeholders like `{{.IMAGE}}` that aren't supported components; forgetting to supply a component in the components map when calling the API programmatically.","solutions":["Use a supported component (e.g. {{.SHA}}, {{.GIT}}, {{.DATE}}) or fix the typo","Register the missing field in the components map if using the API directly","Inspect GetTemplateFields output to see exactly which field is unrecognized","Consult Skaffold docs for the list of valid custom template components"],"exampleFix":"// before\ncustomTemplate: \"{{.SH}}-{{.DATE}}\"\n// after\ncustomTemplate: \"{{.SHA}}-{{.DATE}}\"","handlingStrategy":"validation","validationCode":"// check every template field is a known component before tagging\nknown := map[string]bool{\"DATE\": true, \"SHA\": true, \"GIT\": true, \"LABEL\": true, \"DIGEST\": true, \"INPUT_DIGEST\": true}\nfor _, f := range tag.GetTemplateFields(tmpl) {\n    if !known[f] {\n        if _, ok := components[f]; !ok {\n            return fmt.Errorf(\"unknown template component %q\", f)\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":"taggers, err := tag.EvaluateComponents(ctx, t, image)\nif err != nil {\n    if strings.Contains(err.Error(), \"no tagger available for component\") {\n        return fmt.Errorf(\"fix component name in customTemplate: %w\", err)\n    }\n    return err\n}","preventionTips":["Copy component names from official docs verbatim","Validate customTemplate fields against the supported list in CI","Beware typos: SHA vs SH, DIGEST vs DIGESTS","Register custom components explicitly when using the API"],"tags":["templating","configuration","tagging"],"backgroundTag":"unknown-template-component","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}