{"record":{"id":"ce23531c01397e1b","repo":"puppetlabs/puppet","slug":"manifest-of-environment-environment-name-app-ce2353","errorCode":null,"errorMessage":"manifest of environment '#{@environment.name}' appoints '#{file}'. It does not exist","messagePattern":"manifest of environment '#(.+?)' appoints '#(.+?)'\\. It does not exist","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/loaders.rb","lineNumber":302,"sourceCode":"  # @return [Model::Program] The manifest parsed into a model object\n  def load_main_manifest\n    parser = Parser::EvaluatingParser.singleton\n    parsed_code = Puppet[:code]\n    program = if parsed_code != \"\"\n                parser.parse_string(parsed_code, 'unknown-source-location')\n              else\n                file = @environment.manifest\n\n                # if the manifest file is a reference to a directory, parse and\n                # combine all .pp files in that directory\n                if file == Puppet::Node::Environment::NO_MANIFEST\n                  nil\n                elsif File.directory?(file)\n                  raise Puppet::Error, \"manifest of environment '#{@environment.name}' appoints directory '#{file}'. It must be a file\"\n                elsif File.exist?(file)\n                  parser.parse_file(file)\n                else\n                  raise Puppet::Error, \"manifest of environment '#{@environment.name}' appoints '#{file}'. It does not exist\"\n                end\n              end\n    instantiate_definitions(program, public_environment_loader) unless program.nil?\n    program\n  rescue Puppet::ParseErrorWithIssue => detail\n    detail.environment = @environment.name\n    raise\n  rescue => detail\n    msg = _('Could not parse for environment %{env}: %{detail}') % { env: @environment, detail: detail }\n    error = Puppet::Error.new(msg)\n    error.set_backtrace(detail.backtrace)\n    raise error\n  end\n\n  # Add 4.x definitions found in the given program to the given loader.\n  def instantiate_definitions(program, loader)\n    program.definitions.each { |d| instantiate_definition(d, loader) }\n    nil","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/loaders.rb#L284-L320","documentation":"Companion guard to the directory check in Loaders#load_environment: the manifest path from environment.conf is neither NO_MANIFEST, nor a directory, nor an existing file, so File.exist?(file) is false and Puppet::Error is raised. The appointed manifest file simply is not on disk at that path.","triggerScenarios":"environment.conf `manifest = manifests/site.pp` but the file was never created, was deleted, or the path is relative to a different base than expected; typo in the path; deploy pipeline skipped copying manifests.","commonSituations":"Control repo deploy that copied hiera data but not manifests; branch where site.pp was moved; CI validating an environment before manifests are rendered.","solutions":["Create the missing file at the exact path shown in the message.","Fix the path in environment.conf — relative paths resolve against the environment root, so verify with `ls environments/<env>/<path>`.","If the environment has no manifest, set the manifest setting to no_manifest explicitly."],"exampleFix":"# environment.conf: manifest = manifests/site.pp\n# before: environments/production/manifests/ is empty or missing site.pp\n# after: create environments/production/manifests/site.pp containing at minimum:\n#   node default { }","handlingStrategy":"validation","validationCode":"# Ensure the appointed manifest exists before deploy\nenv_root = 'environments/production'\nmanifest = File.foreach(File.join(env_root, 'environment.conf'))\n                    .map { |l| l[/^\\s*manifest\\s*=\\s*(\\S+)/, 1] }.compact.first\nif manifest && manifest != 'no_manifest'\n  path = File.expand_path(manifest, env_root)\n  raise \"manifest '#{path}' does not exist\" unless File.exist?(path)\nend","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make manifest presence part of the deploy pipeline (fail if the appointed file is missing).","Remember relative manifest paths resolve from the environment root, not environment.conf's directory quirks.","Lint environment.conf in CI together with the file tree it references."],"tags":["puppet","environment-conf","manifest","file-not-found","puppet-error"],"backgroundTag":"puppet-manifest-not-found","analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}