Budibase/budibase · error
File ${filename} not found, cannot update ${service} image.
Error message
File ${filename} not found, cannot update ${service} image. What it means
setServiceImage rewrites the `image:` line for a given service in the Budibase hosting docker-compose file. First it resolves the compose filename via composeFilename() and requires it to exist on disk; if the file is missing it throws this error naming the expected path and the service being updated. Called by the CLI's hosting `update` flow.
Source
Thrown at packages/cli/src/hosting/utils.ts:42
try {
const { services } = getServices(filename)
const serviceKey = Object.keys(services).find(name =>
name.includes(service)
)
if (serviceKey) {
return services[serviceKey].image
} else {
return null
}
} catch (err) {
return null
}
}
export function setServiceImage(service: string, image: string) {
const filename = composeFilename()
if (!fs.existsSync(filename)) {
throw new Error(
`File ${filename} not found, cannot update ${service} image.`
)
}
const current = getServiceImage(service)!
let contents = fs.readFileSync(filename, "utf8")
contents = contents.replace(`image: ${current}`, `image: ${image}`)
fs.writeFileSync(filename, contents)
}
export async function downloadDockerCompose() {
try {
const files = [COMPOSE_URL, LITELLM_CONFIG_URL]
for (const fileUrl of files) {
await downloadFile(fileUrl, `./${hostingFilename(fileUrl)}`)
}
} catch (err) {
console.error(error(`Failed to retrieve required hosting files - ${err}`))
}View on GitHub (pinned to a81a902e9a)
Solutions
- Run `budi hosting init` first to generate the docker-compose file in the current directory
- Check the path printed in the error and create/restore docker-compose.yaml there
- cd into the directory that actually contains the compose file before running hosting commands
- If migrating hosting setups, copy the original docker-compose.yaml to the expected location
Example fix
# before $ budi hosting update --image budibase/budibase:latest # no compose file # after $ budi hosting init # generates docker-compose.yaml $ budi hosting update --image budibase/budibase:latest
Defensive patterns
Strategy: validation
Validate before calling
const fs = require("fs")
function assertComposeFile(dir = ".") {
const p = dir + "/docker-compose.yaml"
if (!fs.existsSync(p)) {
throw new Error("Run `budi hosting init` first to generate docker-compose.yaml")
}
} Try / catch
try {
setServiceImage("app", "budibase/budibase:latest")
} catch (err) {
if ((err as Error).message.includes("not found, cannot update")) {
console.error("Compose file missing - run `budi hosting init` first")
}
throw err
} Prevention
- Always run `budi hosting init` before hosting update/upgrade commands
- Run hosting commands from the directory containing docker-compose.yaml
- Don't rename or move the generated compose file
- Script checks: verify the compose file exists in CI/deploy pipelines before updates
When it happens
Trigger: Running `budi hosting update` (or otherwise calling setServiceImage) when the docker-compose file (composeFilename(), typically docker-compose.yaml in the hosting directory) has not been generated yet, was deleted, or the CLI is run from a directory where it doesn't exist.
Common situations: Running hosting update before ever running `budi hosting init`; deleting/moving docker-compose.yaml manually; running the CLI from the wrong working directory; compose file created under a different name than the CLI expects.
Related errors
- No yaml found at path: ${path}
- 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/e3d2c47d0338bc42.
Report an issue: GitHub.