{"record":{"id":"05d425a321256b42","repo":"windmill-labs/windmill","slug":"no-resource-matching-file-resource-path","errorCode":null,"errorMessage":"No resource matching file resource: ${path}.","messagePattern":"No resource matching file resource: (.+?)\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/script/script.ts","lineNumber":289,"sourceCode":"        return stat(x)\n          .catch(() => undefined)\n          .then((x) => x?.isFile())\n          .then((e) => {\n            return { path: x, file: e };\n          });\n      })\n    )\n  )\n    .filter((x) => x.file)\n    .map((x) => x.path);\n  if (validCandidates.length > 1) {\n    throw new Error(\n      \"Found two resource files for the same resource\" +\n        validCandidates.join(\", \")\n    );\n  }\n  if (validCandidates.length < 1) {\n    throw new Error(`No resource matching file resource: ${path}.`);\n  }\n  return validCandidates[0];\n}\n\n// The separator is whatever the local filesystem uses, so both are accepted:\n// on Windows these paths reach us as `my_script__mod\\script.yaml`.\nconst MODULE_ENTRY_META_RE = /([\\\\/])script\\.(yaml|json|lock)$/;\n\n/**\n * Whether a path is a module folder's own metadata file (`__mod/script.yaml`).\n * `isModuleEntryPoint` already pins the file to `script.*` directly under\n * `__mod/`, so this only narrows it to the metadata extensions: a `script.yaml`\n * nested deeper in the module tree is a module file, not the script's metadata.\n */\nexport function isModuleEntryMetadata(p: string): boolean {\n  return isModuleEntryPoint(p) && MODULE_ENTRY_META_RE.test(p);\n}\n","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/script/script.ts#L271-L307","documentation":"Thrown by findResourceFile during script/resource sync when a file resource reference declares a resource_file but no local candidate file matches it. Candidates are derived from the path (with extension variants) and filtered to entries that actually exist on disk via stat; zero survivors means the referenced file is missing or misnamed. Called by resourceFilePath and found while resolving local file resources for push; the faulting input is the resource's declared path.","triggerScenarios":"Thrown at cli/src/commands/script/script.ts:289 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the missing resource file next to the item referencing it.","Check the path spelling and the workspace- vs folder-relative layout expected by wmill sync."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}