{"record":{"id":"278fc545dd52756c","repo":"dagger/dagger","slug":"unknown-built-in-sdk","errorCode":null,"errorMessage":"unknown built-in sdk","messagePattern":"unknown built-in sdk","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/sdk/loader.go","lineNumber":23,"sourceCode":"\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/dagger/dagger/core\"\n\t\"github.com/dagger/dagger/core/sdk/sdkmeta\"\n\t\"github.com/dagger/dagger/dagql\"\n\t\"github.com/dagger/dagger/engine\"\n\t\"github.com/dagger/dagger/engine/distconsts\"\n\tiversion \"github.com/dagger/dagger/internal/version\"\n\ttelemetry \"github.com/dagger/otel-go\"\n\t\"github.com/opencontainers/go-digest\"\n)\n\nvar (\n\terrMissingSDKRef     = errors.New(\"no sdk ref provided\")\n\terrUnknownBuiltinSDK = errors.New(\"unknown built-in sdk\")\n)\n\ntype Loader struct{}\n\nfunc NewLoader() *Loader {\n\treturn &Loader{}\n}\n\nfunc init() {\n\tcore.SetModuleSourceSDKLoader(func(ctx context.Context, query *core.Query, sdkCfg *core.SDKConfig, src *core.ModuleSource) (core.SDK, error) {\n\t\treturn NewLoader().SDKForModule(ctx, query, sdkCfg, src)\n\t})\n}\n\n// SDKForModule loads an SDK module based on the given SDK configuration.\n//\n// If it's a builtin SDK, it will load it from the engine container.\n// Otherwise, it will load it from the given source either from a URL","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/sdk/loader.go#L5-L41","documentation":"errUnknownBuiltinSDK is a sentinel meaning the requested SDK name is not one of the engine's built-in SDKs (go, dang, python, typescript, java, php, elixir). It is used for control flow: SDKForModule treats it as 'not builtin, try external resolution', so seeing it alone is benign — it only surfaces as a failure when external loading also fails and the final `invalid SDK` error is raised. It is returned by namedSDK/parseSDKName when the name doesn't match a builtin.","triggerScenarios":"SDKForModule called with sdk.Source that is neither a builtin name (e.g. \"ruby\", \"golang\" misspelled) nor a resolvable git/local SDK module ref, so both namedSDK (returns errUnknownBuiltinSDK) and externalSDKForModule fail.","commonSituations":"Typo in the sdk field of dagger.json (e.g. \"sdk\": \"golang\" instead of \"go\"); using an SDK name for a language Dagger doesn't bundle; trying a custom SDK ref that doesn't resolve as a module path.","solutions":["Fix the sdk value in dagger.json to an exact builtin name: go, python, typescript, dang, java, php, or elixir.","If you intended a custom SDK, use a valid module ref (git URL like github.com/dagger/dagger/sdk/elixir@main, or a local path like ./my-sdk).","Run `dagger develop` after fixing dagger.json so the config is revalidated.","Check the error output of SDKForModule, which prints the full list of available SDKs and both failure causes."],"exampleFix":"// before: dagger.json\n{ \"name\": \"my-module\", \"sdk\": \"golang\" }\n// after\n{ \"name\": \"my-module\", \"sdk\": \"go\" }","handlingStrategy":"validation","validationCode":"const BUILTINS = ['go','dang','python','typescript','java','php','elixir']\nconst cfg = JSON.parse(require('fs').readFileSync('dagger.json','utf8'))\nconst name = (cfg.sdk || '').split('@')[0]\nconst isBuiltin = BUILTINS.includes(name)\nconst isRef = /^(github\\.com\\/[^\\s]+|\\.\\.?\\/)/.test(cfg.sdk || '')\nif (!isBuiltin && !isRef) throw new Error(`sdk \"${cfg.sdk}\" is neither builtin nor a module ref`)","typeGuard":"function isBuiltinSdkName(s) {\n  return ['go','dang','python','typescript','java','php','elixir'].includes(String(s).split('@')[0])\n}","tryCatchPattern":null,"preventionTips":["Use exact builtin names: go, dang, python, typescript, java, php, elixir (not 'golang', 'ts', 'js')","For custom SDKs use a full git ref or local path that resolves as a module","Run `dagger develop` to validate config changes early","List valid SDKs from the engine error output when unsure"],"tags":["dagger","sdk","module-config","unknown-identifier"],"backgroundTag":"unknown-builtin-sdk","analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}