{"record":{"id":"d7576ca3d82d3222","repo":"puppetlabs/puppet","slug":"could-not-find-any-files-from-values","errorCode":null,"errorMessage":"Could not find any files from %{values}","messagePattern":"Could not find any files from %(.+?)","errorType":"exception","errorClass":"Puppet::ParseError","httpStatus":null,"severity":"error","filePath":"lib/puppet/parser/functions/file.rb","lineNumber":33,"sourceCode":"\n  * An absolute path, which can load a file from anywhere on disk.\n  * Multiple arguments, which will return the contents of the **first** file\n  found, skipping any files that don't exist.\n  \"\n) do |vals|\n  path = nil\n  vals.each do |file|\n    found = Puppet::Parser::Files.find_file(file, compiler.environment)\n    if found && Puppet::FileSystem.exist?(found)\n      path = found\n      break\n    end\n  end\n\n  if path\n    Puppet::FileSystem.read_preserve_line_endings(path)\n  else\n    raise Puppet::ParseError, _(\"Could not find any files from %{values}\") % { values: vals.join(\", \") }\n  end\nend\n","sourceCodeStart":15,"sourceCodeEnd":36,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/parser/functions/file.rb#L15-L36","documentation":"The file() function iterated every given path and none resolved to an existing file via Puppet::Parser::Files.find_file, so no content could be returned.","triggerScenarios":"Thrown at lib/puppet/parser/functions/file.rb:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the file exists in a module (e.g. modulename/files/...) or at the absolute path given","Check the environment configured on the compiler contains the module"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","contentChangedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}