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

  1. Run `budi hosting init` first to generate the docker-compose file in the current directory
  2. Check the path printed in the error and create/restore docker-compose.yaml there
  3. cd into the directory that actually contains the compose file before running hosting commands
  4. 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

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


AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29). Data as JSON: /api/errors/e3d2c47d0338bc42. Report an issue: GitHub.