{"record":{"id":"b0f014bd66e32e27","repo":"GoogleContainerTools/skaffold","slug":"config-missing-manifest-file-err","errorCode":"CONFIG_MISSING_MANIFEST_FILE_ERR","errorMessage":"Manifest file %q referenced in skaffold config could not be found","messagePattern":"Manifest file %q referenced in skaffold config could not be found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/validation/validation.go","lineNumber":877,"sourceCode":"\t\t// validate that manifest files referenced in config exist\n\t\tfor _, pattern := range c.Render.RawK8s {\n\t\t\tif util.IsURL(pattern) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// filepaths are all absolute from config parsing step via tags.MakeFilePathsAbsolute\n\t\t\texpanded, err := filepath.Glob(pattern)\n\t\t\tif err != nil {\n\t\t\t\terrs = append(errs, ErrorWithLocation{\n\t\t\t\t\tError: err,\n\t\t\t\t})\n\t\t\t}\n\t\t\tif len(expanded) == 0 {\n\t\t\t\t// TODO(aaron-prindle) currently this references the whole manifest list and not the specific entry\n\t\t\t\t// this is related to the fact that string pointers do not work with the current setup, need to get the closest struct\n\t\t\t\t// TODO(aaron-prindle) parse the manifest node to extract exact correct line # for the value here (currently it is the parent obj)\n\t\t\t\tmsg := fmt.Sprintf(\"Manifest file %q referenced in skaffold config could not be found\", pattern)\n\t\t\t\terrMsg := wrapWithContext(c, ErrorWithLocation{\n\t\t\t\t\tError:    errors.New(msg),\n\t\t\t\t\tLocation: c.YAMLInfos.Locate(&c.Render.RawK8s),\n\t\t\t\t})\n\t\t\t\terrs = append(errs, ErrorWithLocation{\n\t\t\t\t\tError: sErrors.NewError(errMsg[0].Error,\n\t\t\t\t\t\t&proto.ActionableErr{\n\t\t\t\t\t\t\tMessage: errMsg[0].Error.Error(),\n\t\t\t\t\t\t\tErrCode: proto.StatusCode_CONFIG_MISSING_MANIFEST_FILE_ERR,\n\t\t\t\t\t\t\tSuggestions: []*proto.Suggestion{\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tSuggestionCode: proto.SuggestionCode_CONFIG_FIX_MISSING_MANIFEST_FILE,\n\t\t\t\t\t\t\t\t\tAction:         fmt.Sprintf(\"Verify that file %q referenced in config %q exists and the path and naming are correct\", pattern, c.SourceFile),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\tLocation: errMsg[0].Location,\n\t\t\t\t})\n\t\t\t}\n\t\t}","sourceCodeStart":859,"sourceCodeEnd":895,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/validation/validation.go#L859-L895","documentation":"During kubectl-targeted validation, Skaffold expands each manifest path/glob listed in the config (e.g. `deploy.kubectl.manifests` or render rawK8s patterns). If a pattern expands to zero files, the referenced manifest file cannot be found on disk, so this error is raised with a YAML location pointing at the config entry.","triggerScenarios":"`manifests:` entry points to a file that doesn't exist; a glob (e.g. ` manifests/*.yaml`) matches nothing because the directory is empty, missing, or the pattern is wrong; running from a different working directory so relative paths don't resolve; profile overlays referencing manifests excluded by .gitignore/kazel transforms.","commonSituations":"Cloning a repo where generated manifests weren't built yet; renaming a k8s directory without updating skaffold.yaml; case-sensitive filesystem mismatch (Kustomize.yaml vs kustomize.yaml); CI running from repo root while paths are relative to a subdir.","solutions":["Create the missing manifest file or fix the path/glob in skaffold.yaml so it matches existing files.","Run the manifest generator (e.g. kustomize build, helm template) before skaffold if the file is generated.","Verify relative paths resolve from the directory where you invoke skaffold; adjust or cd to the config's directory.","Check pattern spelling and case sensitivity (Linux filesystems are case-sensitive)."],"exampleFix":"# before\nmanifests:\n  - k8s/*.yaml   # directory missing\n# after\nmanifests:\n  - deploy/k8s/*.yaml","handlingStrategy":"validation","validationCode":"const patterns = cfg.deploy?.kubectl?.manifests ?? [];\nfor (const p of patterns) {\n  if (!glob.sync(p, { cwd: configDir }).length) throw new Error(`manifest pattern matches no files: ${p}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  execSync('skaffold render -o /dev/null', { stdio: 'inherit' });\n} catch (e) {\n  if (String(e).includes('could not be found')) fixManifestPaths();\n}","preventionTips":["Commit generated manifests or generate them in a pre-skaffold step","Use globs relative to skaffold.yaml's directory and test them with ls","Avoid renaming k8s directories without updating skaffold.yaml"],"tags":["skaffold","kubernetes","manifests","config-validation"],"backgroundTag":"manifest-file-not-found","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"}