{"record":{"id":"4ed6f9d9357f2b28","repo":"puppetlabs/puppet","slug":"one-or-more-file-s-specified-did-not-exist-mis","errorCode":null,"errorMessage":"One or more file(s) specified did not exist:\n%{missing_files_list}","messagePattern":"One or more file\\(s\\) specified did not exist:\n%(.+?)","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/face/epp.rb","lineNumber":97,"sourceCode":"          # directory should not be treated as a failed validation.\n          Puppet.notice _(\"No template specified. No action taken\")\n        end\n      end\n\n      missing_files = []\n      files.each do |file|\n        break if !status && !options[:continue_on_error]\n\n        template_file = effective_template(file, compiler.environment)\n        if template_file\n          tmp = validate_template(template_file)\n          status &&= tmp\n        else\n          missing_files << file\n        end\n      end\n      if !missing_files.empty?\n        raise Puppet::Error, _(\"One or more file(s) specified did not exist:\\n%{missing_files_list}\") %\n                             { missing_files_list: missing_files.map { |f| \"   #{f}\" }.join(\"\\n\") }\n      else\n        # Exit with 1 if there were errors\n        raise Puppet::Error, _(\"Errors while validating epp\") unless status\n      end\n    end\n  end\n\n  action(:dump) do\n    summary _(\"Outputs a dump of the internal template parse tree for debugging\")\n    arguments \"[--format <old|pn|json>] [--pretty] { -e <source> | [<templates> ...] } \"\n    returns _(\"A dump of the resulting AST model unless there are syntax or validation errors.\")\n    description <<-'EOT'\n      The dump action parses and validates the EPP syntax and dumps the resulting AST model\n      in a human readable (but not necessarily an easy to understand) format.\n\n      The output format can be controlled using the --format <old|pn|json> where:\n      * 'old' is the default, but now deprecated format which is not API.","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/face/epp.rb#L79-L115","documentation":"Raised by the `validate` action of the `puppet epp` face when one or more of the requested templates resolved to no file: `effective_template` returns nil for paths that neither exist on disk nor resolve to a `<module>/template.epp` form in the given environment. Remaining templates are still validated first; afterwards the missing paths are listed (indented, one per line) and the action fails. The two-branch structure means this error is raised only when missing_files is non-empty; validation failures alone raise a different error.","triggerScenarios":"`puppet epp validate missing.epp`, or a file list where one path is wrong; `puppet epp validate mymod/nope.epp` where the module form does not resolve; relative paths evaluated from the wrong cwd.","commonSituations":"Typos or stale module names; scripts iterating a glob that includes deleted files; the module not being installed in the environment used (`--environment` mismatch); case-sensitivity after moving configs from macOS/Windows to Linux.","solutions":["Check every path in the list with ls, or switch to the module form `puppet epp validate module/template.epp`","Run from the module directory or pass absolute paths","Verify the module exists in the environment being used (`puppet module list`)","Quote globs in scripts so shell expansion doesn't silently drop entries"],"exampleFix":"# before\npuppet epp validate app/temple.epp        # typo\n# after\npuppet epp validate app/template.epp\n# or module form\npuppet epp validate mymod/template.epp","handlingStrategy":"validation","validationCode":"missing = templates.reject { |t| File.exist?(t) || t.include?('/') && Puppet.lookup(:current_environment).module(t.split('/').first) }\nabort \"templates not found: #{missing.join(', ')}\" unless missing.empty?","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Resolve template paths with File.expand_path before passing them to the face","Use the module/template.epp form so the environment modulepath handles resolution","Fail scripts early when a glob matches zero files instead of passing bad paths on"],"tags":["epp","template","file-not-found","puppet-epp"],"backgroundTag":"file-not-found","analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}