{"record":{"id":"ebcb6be065230a2e","repo":"docker/compose","slug":"none-of-the-selected-services-is-configured-for-wa-ebcb6b","errorCode":null,"errorMessage":"none of the selected services is configured for watch, consider setting a 'develop' section","messagePattern":"none of the selected services is configured for watch, consider setting a 'develop' section","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/compose/watch.go","lineNumber":268,"sourceCode":"\t\t\t\t\t// Need to check that initial files meant to be synced from the watch action are in the container\n\t\t\t\t\terr := s.initialSync(ctx, project, service, trigger, syncer)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tpaths = append(paths, trigger.Path)\n\t\t}\n\n\t\tserviceWatchRules, err := getWatchRules(config, service)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trules = append(rules, serviceWatchRules...)\n\t}\n\n\tif len(paths) == 0 {\n\t\treturn nil, fmt.Errorf(\"none of the selected services is configured for watch, consider setting a 'develop' section\")\n\t}\n\n\twatcher, err := watch.NewWatcher(paths)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = watcher.Start()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\teg.Go(func() error {\n\t\treturn s.watchEvents(ctx, project, options, watcher, syncer, rules)\n\t})\n\toptions.LogTo.Log(api.WatchLogger, \"Watch enabled\")\n\n\treturn func() error {","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/docker/compose/blob/ddc4b044b62e9f715212ea4143fa830fac76382f/pkg/compose/watch.go#L250-L286","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Add at least one entry under develop.watch with a path and action for a selected service.","Check YAML indentation so develop.watch actually parses (docker compose config to inspect the resolved schema).","If a watched path is also bind-mounted, remove the duplicate bind mount or point the watch elsewhere — duplicates are skipped.","Ensure the services passed to watch are the ones carrying develop sections."],"exampleFix":"# before\nservices:\n  web:\n    develop: {}        # no watch entries\n\n# after\nservices:\n  web:\n    develop:\n      watch:\n        - action: sync+restart\n          path: ./app\n          target: /app","handlingStrategy":"validation","validationCode":"func watchPathsExist(project *types.Project) int {\n\tn := 0\n\tfor _, svc := range project.Services {\n\t\tif svc.Develop == nil { continue }\n\t\tn += len(svc.Develop.Watch)\n\t}\n\treturn n // call watch only when n > 0\n}","typeGuard":null,"tryCatchPattern":"if _, err := composeService.Watch(ctx, projectName, opts); err != nil {\n    if strings.Contains(err.Error(), \"consider setting a 'develop' section\") {\n        // add develop.watch entries with paths, ensure none are shadowed by bind mounts\n    }\n    return err\n}","preventionTips":["Author at least one meaningful develop.watch entry per watched service.","Do not bind-mount the same path a watch rule targets — such rules are skipped.","Check docker compose config output to confirm develop.watch parses as intended."],"tags":["compose","watch","develop","configuration"],"backgroundTag":null,"analyzedSha":"ddc4b044b62e9f715212ea4143fa830fac76382f","analyzedAt":"2026-08-15T13:31:42.319Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}