{"record":{"id":"5c286084523f2139","repo":"helm/helm","slug":"no-chart-version-found","errorCode":null,"errorMessage":"no chart version found","messagePattern":"no chart version found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/repo/v1/index.go","lineNumber":50,"sourceCode":"\n\t\"github.com/Masterminds/semver/v3\"\n\t\"sigs.k8s.io/yaml\"\n\n\t\"helm.sh/helm/v4/internal/fileutil\"\n\t\"helm.sh/helm/v4/internal/urlutil\"\n\tchart \"helm.sh/helm/v4/pkg/chart/v2\"\n\t\"helm.sh/helm/v4/pkg/chart/v2/loader\"\n\t\"helm.sh/helm/v4/pkg/provenance\"\n)\n\n// APIVersionV1 is the v1 API version for index and repository files.\nconst APIVersionV1 = \"v1\"\n\nvar (\n\t// ErrNoAPIVersion indicates that an API version was not specified.\n\tErrNoAPIVersion = errors.New(\"no API version specified\")\n\t// ErrNoChartVersion indicates that a chart with the given version is not found.\n\tErrNoChartVersion = errors.New(\"no chart version found\")\n\t// ErrNoChartName indicates that a chart with the given name is not found.\n\tErrNoChartName = errors.New(\"no chart name found\")\n\t// ErrEmptyIndexYaml indicates that the content of index.yaml is empty.\n\tErrEmptyIndexYaml = errors.New(\"empty index.yaml file\")\n)\n\n// ChartVersions is a list of versioned chart references.\n// Implements a sorter on Version.\ntype ChartVersions []*ChartVersion\n\n// Len returns the length.\nfunc (c ChartVersions) Len() int { return len(c) }\n\n// Swap swaps the position of two items in the versions slice.\nfunc (c ChartVersions) Swap(i, j int) { c[i], c[j] = c[j], c[i] }\n\n// Less returns true if the version of entry a is less than the version of entry b.\nfunc (c ChartVersions) Less(a, b int) bool {","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/helm/helm/blob/2a29f1770b62844b27197d2507377361d45ad7c0/pkg/repo/v1/index.go#L32-L68","documentation":"ErrNoChartVersion is returned by IndexFile.Get (pkg/repo/v1/index.go:202 and the constraint-match tail) when a chart name exists in the index but no listed version satisfies the requested semver constraint — including the case where the entries list for the name is empty.","triggerScenarios":"IndexFile.Get(name, version) where version is a constraint matching no published version, e.g. --version=2.0.0 when only 1.x is indexed; requesting a stable version when only prereleases exist (prereleases are skipped by default resolution); an entry present in Entries but with an empty ChartVersions list.","commonSituations":"Stale local index after a chart was published (no helm repo update run); typos in the version flag; pinning to a version that was yanked from the repo; expecting a prerelease without specifying it exactly.","solutions":["Run `helm repo update` and retry — the most common cause is a stale local index","List what actually exists: `helm search repo <chart> --versions`","Loosen or correct the constraint (e.g. ^1.2.0 instead of 1.2.0), or reference the exact prerelease version like 2.0.0-rc.1"],"exampleFix":"# before\nhelm pull acme/wordpress --version 3.9.9\n# after\nhelm repo update && helm search repo acme/wordpress --versions\nhelm pull acme/wordpress --version ^3.7.0","handlingStrategy":"try-catch","validationCode":"idx, err := repo.LoadIndexFile(path)\nif err != nil { return err }\nif _, ok := idx.Entries[name]; ok {\n    for _, cv := range idx.Entries[name] {\n        if ok, _ := semver.NewConstraint(want); ok != nil { /* pre-check match */ }\n    }\n}","typeGuard":"func hasVersion(idx *repo.IndexFile, name, ver string) bool {\n    vs, ok := idx.Entries[name]\n    if !ok { return false }\n    c, err := semver.NewConstraint(ver)\n    if err != nil { return false }\n    for _, v := range vs {\n        if s, err := semver.NewVersion(v.Version); err == nil && c.Check(s) { return true }\n    }\n    return false\n}","tryCatchPattern":"if _, err := idx.Get(name, version); err != nil {\n    if errors.Is(err, repo.ErrNoChartVersion) {\n        // helm repo update, or widen the constraint\n    }\n}","preventionTips":["Run helm repo update before version-pinned pulls in CI","Pre-check constraints against the loaded index and report available versions","Pin exact published versions, not aspirations; include prereleases explicitly"],"tags":["repository","versioning","semver","index"],"backgroundTag":null,"analyzedSha":"2a29f1770b62844b27197d2507377361d45ad7c0","analyzedAt":"2026-08-15T22:02:47.490Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}