Budibase/budibase · error
No yaml found at path: ${path}
Error message
No yaml found at path: ${path} What it means
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.
Source
Thrown at packages/cli/src/hosting/utils.ts:94
) {
throw "Please run the hosting --init command before any other hosting command."
}
}
export async function handleError(func: Function) {
try {
await func()
} catch (err: any) {
if (err && err.err) {
logErrorToFile(ERROR_FILE, err.err)
}
throw `Failed to start - logs written to file: ${ERROR_FILE}`
}
}
export function getServices(path: string) {
if (!fs.existsSync(path)) {
throw new Error(`No yaml found at path: ${path}`)
}
const dockerYaml = fs.readFileSync(path, "utf8")
const parsedYaml = yaml.parse(dockerYaml)
return { yaml: parsedYaml, services: parsedYaml.services }
}
export function getAppService(path: string) {
const { yaml, services } = getServices(path),
serviceList = Object.keys(services)
let service
if (services["app-service"]) {
service = services["app-service"]
} else if (serviceList.length === 1) {
service = services[serviceList[0]]
}
return { yaml, service }
}
View on GitHub (pinned to a81a902e9a)
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
Example fix
// before
getServices("/opt/budibase/docker-compose.yaml") // file absent
// after
import fs from "fs"
const p = "/opt/budibase/docker-compose.yaml"
if (fs.existsSync(p)) getServices(p) Defensive patterns
Strategy: validation
Validate before calling
const fs = require("fs")
function getServicesSafe(path) {
if (!fs.existsSync(path)) {
throw new Error(`docker-compose file missing at ${path}; run "budi hosting init"`)
}
return getServices(path)
} Try / catch
try {
const { services } = getServices(composePath)
} catch (err) {
if ((err as Error).message.startsWith("No yaml found at path")) {
console.error(`Compose YAML missing at ${composePath}; run hosting init first`)
}
throw err
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- File ${filename} not found, cannot update ${service} image.
- Unable to access MinIO/S3 - check environment config.
- Replication failed - ${JSON.stringify(err)}
- pnpm is required to run this project (pnpm-lock.yaml or pack
- npm is required to run this project (package-lock.json or pa
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/f955fcc70f59ed64.
Report an issue: GitHub.