Skip to content
Latchkey

Docker Compose "develop.watch" - Invalid Config / Unknown Action in CI

A develop.watch entry failed validation. Each rule needs a valid action (sync, rebuild, or sync+restart) and the fields that action requires - a sync needs both path and target. A bad action or a missing field fails the config.

What this error means

A docker compose watch (or config) fails validating the develop.watch block with an unknown action or a missing-property error. The rest of the compose file is valid; only the develop section is rejected.

docker compose output
services.web.develop.watch[0].action must be one of "sync", "rebuild", "sync+restart"
# or: services.web.develop.watch[0]: "target" is required when action is "sync"

Common causes

Unknown or misspelled watch action

The action must be one of sync, rebuild, or sync+restart. A typo or an invented action fails validation.

Missing required fields for the action

A sync action needs both path (host) and target (container). Omitting target (or path) makes the rule invalid.

Wrong nesting under the service

Misindenting watch so it is not under develop, or making it a mapping instead of a list, breaks the schema.

How to fix it

Use a valid action with its required fields

Pick a supported action and supply the fields it needs.

docker-compose.yml
develop:
  watch:
    - action: sync
      path: ./src
      target: /app/src
    - action: rebuild
      path: ./package.json

Validate the resolved config

Render the parsed config to surface the exact develop.watch error.

Terminal
docker compose config

How to prevent it

  • Use only the supported watch actions.
  • Provide path and target for every sync rule.
  • Run docker compose config to validate the develop block.

Related guides

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