Skip to content
Latchkey

Dagger "function not found" in CI

dagger call routes to a function on the loaded module. If no function matches the name you gave, the engine reports it is not found. Dagger normalizes names, so casing and hyphenation matter, and only exported functions are callable.

What this error means

dagger fails with "function \"X\" not found" or "no such function", listing the functions the module does expose.

dagger
Error: function "unit-test" not found in module "ci"
available functions: build, test, publish

Common causes

The function name does not match

Dagger maps names between the SDK and the CLI (camelCase becomes kebab-case). A wrong casing or a typo does not resolve.

The function is not exported

Only functions on the main object with the exported signature are callable; an unexported or helper method is not exposed.

How to fix it

List the exposed functions

  1. List the module's functions to see the exact callable names.
  2. Call the function using its kebab-case name.
  3. Export the function on the main object if it is missing.
Terminal
dagger functions
dagger call test

Export the function in the SDK

Make sure the method is a public function on the module's main object so Dagger exposes it.

How to prevent it

  • Use dagger functions to confirm callable names.
  • Remember camelCase in code maps to kebab-case on the CLI.
  • Export the functions you intend to call.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →