{"record":{"id":"0fc3c7078b18b811","repo":"OpenRA/OpenRA","slug":"nodes-i-location-file-filename-not-found","errorCode":null,"errorMessage":"{nodes[i].Location}: File `{filename}` not found.","messagePattern":"(.+?): File `(.+?)` not found\\.","errorType":"exception","errorClass":"YamlException","httpStatus":null,"severity":"error","filePath":"OpenRA.Game/Manifest.cs","lineNumber":107,"sourceCode":"\t\tpublic readonly FrozenDictionary<string, MiniYaml> GlobalModData;\n\n\t\tpublic Manifest(string modId, IReadOnlyPackage package)\n\t\t{\n\t\t\tId = modId;\n\t\t\tPackage = package;\n\n\t\t\tvar stringPool = new HashSet<string>(); // Reuse common strings in YAML\n\t\t\tvar nodes = MiniYaml.FromStream(package.GetStream(\"mod.yaml\"), $\"{package.Name}:mod.yaml\", stringPool: stringPool).ToList();\n\t\t\tfor (var i = nodes.Count - 1; i >= 0; i--)\n\t\t\t{\n\t\t\t\tif (nodes[i].Key != \"Include\")\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// Replace `Includes: filename.yaml` with the contents of filename.yaml\n\t\t\t\tvar filename = nodes[i].Value.Value;\n\t\t\t\tvar contents = package.GetStream(filename);\n\t\t\t\tif (contents == null)\n\t\t\t\t\tthrow new YamlException($\"{nodes[i].Location}: File `{filename}` not found.\");\n\n\t\t\t\tnodes.RemoveAt(i);\n\t\t\t\tnodes.InsertRange(i, MiniYaml.FromStream(contents, $\"{package.Name}:{filename}\", stringPool: stringPool));\n\t\t\t}\n\n\t\t\t// Merge inherited overrides\n\t\t\tvar yaml = new MiniYaml(null, MiniYaml.Merge([nodes])).ToDictionary();\n\n\t\t\tMetadata = FieldLoader.Load<ModMetadata>(yaml[\"Metadata\"]);\n\n\t\t\t// TODO: Use fieldloader\n\t\t\tMapFolders = YamlDictionary(yaml, \"MapFolders\");\n\n\t\t\tif (!yaml.TryGetValue(\"FileSystem\", out FileSystem))\n\t\t\t\tthrow new InvalidDataException(\"`FileSystem` section is not defined.\");\n\n\t\t\tRules = YamlList(yaml, \"Rules\");\n\t\t\tSequences = YamlList(yaml, \"Sequences\");","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/OpenRA/OpenRA/blob/a520984d91eda9de48a62b1d15c1e3bad0d4fb1a/OpenRA.Game/Manifest.cs#L89-L125","documentation":"Thrown by the Manifest constructor while expanding Include nodes in mod.yaml. Each Include names a YAML file inside the mod package; if package.GetStream(filename) returns null the include target does not exist inside the package, and loading aborts with a YamlException that includes the source location of the offending Include line.","triggerScenarios":"Manifest constructor: iterating mod.yaml nodes, an 'Include' node whose Value (a filename) is not resolvable via package.GetStream, i.e. the included file is absent from the mod package.","commonSituations":"An Include references a file that was renamed, moved out of the package, or never committed; a typo in the include path; or an include meant for a different mod package.","solutions":["Check the filename in the Include line for typos and confirm the file exists inside the mod package (the location in the message points at the Include node).","Remove the Include node if it is no longer needed.","Restore or re-add the referenced YAML file to the package."],"exampleFix":"# mod.yaml (before)\nInclude: rules/extra.yaml   # file does not exist\n# mod.yaml (after)\nInclude: rules/extras.yaml   # corrected path","handlingStrategy":"validation","validationCode":"// Validate every Include target exists in the package before expansion.\nforeach (var node in modYamlNodes.Where(n => n.Key == \"Include\"))\n    if (package.GetStream(node.Value.Value) == null)\n        throw new YamlException($\"{node.Location}: Include target `{node.Value.Value}` not found in package.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat Include paths as package-relative and verify they exist before renaming files.","Run a manifest validation pass after editing mod.yaml or its includes.","Keep includes and their target files versioned together."],"tags":["yaml","manifest","config","filesystem","load-time"],"backgroundTag":null,"analyzedSha":"a520984d91eda9de48a62b1d15c1e3bad0d4fb1a","analyzedAt":"2026-08-13T15:30:14.787Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}