{"record":{"id":"90bba74630e3fd9f","repo":"helm/helm","slug":"invalid-version-s-for-dependency-s-w","errorCode":null,"errorMessage":"invalid version %s for dependency %s: %w","messagePattern":"invalid version (.+?) for dependency (.+?): %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/downloader/manager.go","lineNumber":296,"sourceCode":"\tfor _, dep := range deps {\n\t\t// No repository means the chart is in charts directory\n\t\tif dep.Repository == \"\" {\n\t\t\tfmt.Fprintf(m.Out, \"Dependency %s did not declare a repository. Assuming it exists in the charts directory\\n\", dep.Name)\n\t\t\t// NOTE: we are only validating the local dependency conforms to the constraints. No copying to tmpPath is necessary.\n\t\t\tchartPath := filepath.Join(destPath, dep.Name)\n\t\t\tch, err := loader.LoadDir(chartPath)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"unable to load chart '%s': %w\", chartPath, err)\n\t\t\t}\n\n\t\t\tconstraint, err := semver.NewConstraint(dep.Version)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"dependency %s has an invalid version/constraint format: %w\", dep.Name, err)\n\t\t\t}\n\n\t\t\tv, err := semver.NewVersion(ch.Metadata.Version)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid version %s for dependency %s: %w\", dep.Version, dep.Name, err)\n\t\t\t}\n\n\t\t\tif !constraint.Check(v) {\n\t\t\t\tsaveError = fmt.Errorf(\"dependency %s at version %s does not satisfy the constraint %s\", dep.Name, ch.Metadata.Version, dep.Version)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif strings.HasPrefix(dep.Repository, \"file://\") {\n\t\t\tif m.Debug {\n\t\t\t\tfmt.Fprintf(m.Out, \"Archiving %s from repo %s\\n\", dep.Name, dep.Repository)\n\t\t\t}\n\t\t\tver, err := tarFromLocalDir(m.ChartPath, dep.Name, dep.Repository, dep.Version, tmpPath, m.SourceDateEpoch)\n\t\t\tif err != nil {\n\t\t\t\tsaveError = err\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tdep.Version = ver","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/helm/helm/blob/2a29f1770b62844b27197d2507377361d45ad7c0/pkg/downloader/manager.go#L278-L314","documentation":"Thrown by Manager.downloadAll when semver.NewVersion cannot parse the version of the locally vendored dependency chart — i.e. the Chart.yaml inside charts/<name>/ has a non-semver version string. Note the message prints dep.Version (the constraint from the parent chart) while the actual parse failure is on ch.Metadata.Version of the vendored chart, which can be confusing.","triggerScenarios":"`helm dependency update/build` with a repository-less dependency where charts/<name>/Chart.yaml contains an invalid version: \"latest\", \"dev\", \"1.2\", empty string, or a commit SHA.","commonSituations":"Vendored subcharts generated by scripts that stamp git SHAs or branch names into version; placeholder versions like 0.1.0-SNAPSHOT variants that are valid but strings like \"VERSION\" are not; charts copied from source repos that never set a semver version.","solutions":["Open charts/<name>/Chart.yaml and check its version field (the parent's dep.Version in the message is a red herring for the parsed value).","Set a valid semantic version, e.g. version: 1.2.3 (pre-release/metadata like 1.2.3-rc.1+build are fine).","Repackage/re-vendor the corrected subchart and re-run helm dependency update.","Add a CI check (helm lint) on vendored subcharts to catch non-semver versions early."],"exampleFix":"# before (charts/common/Chart.yaml)\napiVersion: v2\nname: common\nversion: latest\n\n# after\napiVersion: v2\nname: common\nversion: 2.3.1","handlingStrategy":"validation","validationCode":"func vendoredVersionOK(chartPath, name string) error {\n\tc, err := loader.LoadDir(filepath.Join(chartPath, \"charts\", name))\n\tif err != nil { return err }\n\tif _, err := semver.NewVersion(c.Metadata.Version); err != nil {\n\t\treturn fmt.Errorf(\"vendored chart %s has non-semver version %q\", name, c.Metadata.Version)\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set a semver version in every vendored subchart's Chart.yaml.","Remember the error prints the parent constraint, but the invalid value is in charts/<name>/Chart.yaml — check there first."],"tags":["dependencies","semver","chart-yaml","vendoring","helm"],"backgroundTag":null,"analyzedSha":"2a29f1770b62844b27197d2507377361d45ad7c0","analyzedAt":"2026-08-15T22:02:47.490Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}