{"record":{"id":"f955fcc70f59ed64","repo":"Budibase/budibase","slug":"no-yaml-found-at-path-path","errorCode":null,"errorMessage":"No yaml found at path: ${path}","messagePattern":"No yaml found at path: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/hosting/utils.ts","lineNumber":94,"sourceCode":"  ) {\n    throw \"Please run the hosting --init command before any other hosting command.\"\n  }\n}\n\nexport async function handleError(func: Function) {\n  try {\n    await func()\n  } catch (err: any) {\n    if (err && err.err) {\n      logErrorToFile(ERROR_FILE, err.err)\n    }\n    throw `Failed to start - logs written to file: ${ERROR_FILE}`\n  }\n}\n\nexport function getServices(path: string) {\n  if (!fs.existsSync(path)) {\n    throw new Error(`No yaml found at path: ${path}`)\n  }\n  const dockerYaml = fs.readFileSync(path, \"utf8\")\n  const parsedYaml = yaml.parse(dockerYaml)\n  return { yaml: parsedYaml, services: parsedYaml.services }\n}\n\nexport function getAppService(path: string) {\n  const { yaml, services } = getServices(path),\n    serviceList = Object.keys(services)\n  let service\n  if (services[\"app-service\"]) {\n    service = services[\"app-service\"]\n  } else if (serviceList.length === 1) {\n    service = services[serviceList[0]]\n  }\n  return { yaml, service }\n}\n","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/cli/src/hosting/utils.ts#L76-L112","documentation":"getServices reads and parses a docker-compose YAML file so the Budibase CLI can inspect its services (used by hosting start/status flows). It validates the path exists before reading; if not, it throws this error. The throw happens before any YAML parsing, so a malformed file gives a different (yaml.parse) error, not this one.","triggerScenarios":"Calling getServices (via the hosting `start`/status code paths) with a path to docker-compose.yaml that doesn't exist — e.g. hosting commands run before `budi hosting init`, from the wrong working directory, or after the compose file was deleted/renamed.","commonSituations":"Fresh machines where hosting was never initialized; running `budi hosting start` in a directory other than the one containing docker-compose.yaml; compose file moved to a custom location without updating the path passed to the CLI; PATH/cwd differences under systemd or CI.","solutions":["Run `budi hosting init` to generate the docker-compose file at the expected path","cd to the directory containing docker-compose.yaml (or pass the correct path) before running hosting commands","Restore the file if it was deleted, or point the CLI at the actual YAML path","Verify with `ls` that the file exists at the exact path in the error message"],"exampleFix":"// before\ngetServices(\"/opt/budibase/docker-compose.yaml\")  // file absent\n// after\nimport fs from \"fs\"\nconst p = \"/opt/budibase/docker-compose.yaml\"\nif (fs.existsSync(p)) getServices(p)","handlingStrategy":"validation","validationCode":"const fs = require(\"fs\")\nfunction getServicesSafe(path) {\n  if (!fs.existsSync(path)) {\n    throw new Error(`docker-compose file missing at ${path}; run \"budi hosting init\"`)\n  }\n  return getServices(path)\n}","typeGuard":null,"tryCatchPattern":"try {\n  const { services } = getServices(composePath)\n} catch (err) {\n  if ((err as Error).message.startsWith(\"No yaml found at path\")) {\n    console.error(`Compose YAML missing at ${composePath}; run hosting init first`)\n  }\n  throw err\n}","preventionTips":["Initialize hosting (`budi hosting init`) before start/status commands","Resolve the compose path from a known root instead of relative cwd","Check `ls docker-compose.yaml` when running from scripts/cron with different working directories","Keep the generated compose file under version control or backup so it can be restored"],"tags":["cli","hosting","docker-compose","file-not-found"],"backgroundTag":"config-file-missing","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}