{"record":{"id":"80c62d141c652dc4","repo":"dagger/dagger","slug":"module-requires-dagger-s-but-you-have-s","errorCode":null,"errorMessage":"module requires dagger %s, but you have %s","messagePattern":"module requires dagger (.+?), but you have (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/modules/config.go","lineNumber":127,"sourceCode":"\t}\n\tif err := checkModuleConfigVersion(meta.EngineVersion); err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar modCfg ModuleConfigWithUserFields\n\tif err := json.Unmarshal(src, &modCfg); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to decode module config: %w\", err)\n\t}\n\tif err := validateLegacyModuleConfigJSON(src); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &modCfg, nil\n}\n\nfunc checkModuleConfigVersion(version string) error {\n\tversion = engine.NormalizeVersion(version)\n\tif !engine.CheckMaxVersionCompatibility(version, engine.BaseVersion(engine.Version)) {\n\t\treturn fmt.Errorf(\"module requires dagger %s, but you have %s\", version, engine.Version)\n\t}\n\treturn nil\n}\n\nfunc MarshalModuleConfigForFilename(modCfg *ModuleConfigWithUserFields, filename string) ([]byte, error) {\n\treturn MarshalModuleConfigForFormat(modCfg, ConfigFormatForFilename(filename))\n}\n\nfunc MarshalModuleConfigForFormat(modCfg *ModuleConfigWithUserFields, format ConfigFormat) ([]byte, error) {\n\tvar (\n\t\tout []byte\n\t\terr error\n\t)\n\tswitch format {\n\tcase ConfigFormatCurrent:\n\t\tvar buf bytes.Buffer\n\t\terr = toml.NewEncoder(&buf).\n\t\t\tOrder(toml.OrderPreserve).","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/modules/config.go#L109-L145","documentation":"This error means a dagger.json module config declares an SDK version that is not compatible with the currently running Dagger CLI/engine version. checkModuleConfigVersion normalizes the required version and compares it against the CLI's max compatible version; when the module needs a newer (or otherwise incompatible) Dagger release, the CLI refuses to load the module and reports both the required version and the version you actually have.","triggerScenarios":"Loading any module whose dagger.json sets an sdk version string (e.g. \"sdk\": \"python\" with a required engine version, or a pinned engineVersion field) that fails engine.CheckMaxVersionCompatibility against engine.BaseVersion(engine.Version). The check runs in parseCurrentModuleConfigTOML and parseLegacyModuleConfigJSON, so it fires on every module config parse, including legacy JSON configs.","commonSituations":"A teammate bumped the module's required Dagger version but you haven't upgraded your CLI; cloning a project built against a newer Dagger release; CI runners with a stale dagger binary; switching branches to one that uses a newer SDK/engine requirement.","solutions":["Upgrade the Dagger CLI to the version (or newer) named in the error message, e.g. run the official install script or your package manager's update","If upgrading is not possible, lower the module's required version in dagger.json to one compatible with your installed CLI","Pin a matching dagger version in CI (install the version from the error message) so builds are reproducible","If the requirement is stale, re-test the module with your current Dagger version and relax the pinned version"],"exampleFix":"// dagger.json (before)\n{ \"sdk\": \"python\", \"engineVersion\": \"v0.15.0\" }  // CLI is v0.14.x\n// after upgrading the CLI: dagger version shows >= v0.15.0, or relax the pin:\n{ \"sdk\": \"python\", \"engineVersion\": \"v0.14.4\" }","handlingStrategy":"validation","validationCode":"// before loading, compare versions yourself\nreq := \"v0.15.0\" // from dagger.json engineVersion\nif !engine.CheckMaxVersionCompatibility(engine.NormalizeVersion(req), engine.BaseVersion(engine.Version)) {\n\tfmt.Printf(\"upgrade dagger CLI to >= %s (you have %s)\\n\", req, engine.Version)\n\tos.Exit(1)\n}","typeGuard":"func isCompatible(required, installed string) bool {\n\treturn engine.CheckMaxVersionCompatibility(engine.NormalizeVersion(required), engine.BaseVersion(installed))\n}","tryCatchPattern":null,"preventionTips":["Pin the dagger CLI version in CI to match the module's engineVersion","Check `dagger version` after any toolchain upgrade","Keep engineVersion in dagger.json updated together with team-wide CLI upgrades"],"tags":["dagger","version-mismatch","module-config","cli"],"backgroundTag":"engine-version-mismatch","analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}