docker/compose · warning

none of the selected services is configured for watch, consi

Error message

none of the selected services is configured for watch, consider setting a 'develop' section

What it means

After iterating the selected services' develop configs and collecting watch paths, none were found (paths is empty). This is the fallback in the rule-building path: every service either had no develop section or a develop section with no usable watch entries, so there is nothing for the file watcher to monitor.

Source

Thrown at pkg/compose/watch.go:268

					// Need to check that initial files meant to be synced from the watch action are in the container
					err := s.initialSync(ctx, project, service, trigger, syncer)
					if err != nil {
						return nil, err
					}
				}
			}
			paths = append(paths, trigger.Path)
		}

		serviceWatchRules, err := getWatchRules(config, service)
		if err != nil {
			return nil, err
		}
		rules = append(rules, serviceWatchRules...)
	}

	if len(paths) == 0 {
		return nil, fmt.Errorf("none of the selected services is configured for watch, consider setting a 'develop' section")
	}

	watcher, err := watch.NewWatcher(paths)
	if err != nil {
		return nil, err
	}

	err = watcher.Start()
	if err != nil {
		return nil, err
	}

	eg.Go(func() error {
		return s.watchEvents(ctx, project, options, watcher, syncer, rules)
	})
	options.LogTo.Log(api.WatchLogger, "Watch enabled")

	return func() error {

View on GitHub (pinned to ddc4b044b6)

Solutions

  1. Add at least one entry under develop.watch with a path and action for a selected service.
  2. Check YAML indentation so develop.watch actually parses (docker compose config to inspect the resolved schema).
  3. If a watched path is also bind-mounted, remove the duplicate bind mount or point the watch elsewhere — duplicates are skipped.
  4. Ensure the services passed to watch are the ones carrying develop sections.

Example fix

# before
services:
  web:
    develop: {}        # no watch entries

# after
services:
  web:
    develop:
      watch:
        - action: sync+restart
          path: ./app
          target: /app
Defensive patterns

Strategy: validation

Validate before calling

func watchPathsExist(project *types.Project) int {
	n := 0
	for _, svc := range project.Services {
		if svc.Develop == nil { continue }
		n += len(svc.Develop.Watch)
	}
	return n // call watch only when n > 0
}

Try / catch

if _, err := composeService.Watch(ctx, projectName, opts); err != nil {
    if strings.Contains(err.Error(), "consider setting a 'develop' section") {
        // add develop.watch entries with paths, ensure none are shadowed by bind mounts
    }
    return err
}

Prevention

When it happens

Trigger: Calling the watch API where none of the selected services yields a watch path — develop blocks absent, empty, or containing only entries filtered out (e.g. paths already covered by bind mounts).

Common situations: Authoring develop: {} as a placeholder; watch entries whose paths duplicate bind-mounted volumes (skipped with a warning); selecting the wrong services; YAML indentation putting watch under the wrong key so it parses as empty.

Related errors


AI-assisted analysis of docker/compose@ddc4b044b6 (2026-08-15). Data as JSON: /api/errors/ebcb6be065230a2e. Report an issue: GitHub.