{"record":{"id":"e73aa784ae651bd5","repo":"dagger/dagger","slug":"resolving-blueprint-module-w","errorCode":null,"errorMessage":"resolving blueprint module: %w","messagePattern":"resolving blueprint module: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/server/session_workspaces.go","lineNumber":1767,"sourceCode":"\t\tif i < len(src.Self().ConfigToolchains) {\n\t\t\tcfg = src.Self().ConfigToolchains[i]\n\t\t}\n\t\tpending := pendingRelatedModule(defaultPathContextSrc, toolchainSrc.Self(), cfg, false)\n\t\ttoolchainMod, err := srv.resolveModuleSourceAsModule(ctx, dag, toolchainSrc, pending)\n\t\tif err != nil {\n\t\t\treturn resolvedModuleLoad{}, fmt.Errorf(\"resolving toolchain module: %w\", err)\n\t\t}\n\t\tresolved.related = append(resolved.related, resolvedServedModule{\n\t\t\tmod:        toolchainMod,\n\t\t\tentrypoint: false,\n\t\t})\n\t}\n\n\tif src.Self().Blueprint.Self() != nil {\n\t\tpending := pendingRelatedModule(defaultPathContextSrc, src.Self().Blueprint.Self(), src.Self().ConfigBlueprint, true)\n\t\tblueprintMod, err := srv.resolveModuleSourceAsModule(ctx, dag, src.Self().Blueprint, pending)\n\t\tif err != nil {\n\t\t\treturn resolvedModuleLoad{}, fmt.Errorf(\"resolving blueprint module: %w\", err)\n\t\t}\n\t\tresolved.related = append(resolved.related, resolvedServedModule{\n\t\t\tmod:        blueprintMod,\n\t\t\tentrypoint: true,\n\t\t})\n\t\tresolved.primaryEntrypoint = false\n\t}\n\n\treturn resolved, nil\n}\n\n// serveResolvedModuleLoadsLocked serves resolved primary modules and their\n// related modules (blueprints, toolchains-of-toolchains), skipping any whose\n// identity an earlier batch already served. client.stateMu and client.modulesMu\n// must be held.\n//\n// Transitive dependencies are only served for the entrypoint module — the one\n// the user is interacting with via `dagger call` or `dagger shell`. This is","sourceCodeStart":1749,"sourceCodeEnd":1785,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/engine/server/session_workspaces.go#L1749-L1785","documentation":"When the module source declares a blueprint (src.Self().Blueprint), the blueprint module is resolved with resolveModuleSourceAsModule and its failure is wrapped as 'resolving blueprint module'. The blueprint is loaded as a related entrypoint module, so a broken blueprint blocks the whole module load.","triggerScenarios":"Loading a module whose source has a non-nil Blueprint (with ConfigBlueprint settings) where the blueprint module itself fails resolveModuleSourceAsModule: invalid blueprint path in config, blueprint source errors, or SDK/compile failures inside the blueprint module.","commonSituations":"Blueprint directory renamed/deleted while config still references it; blueprint module has its own broken dependencies; SDK version mismatch in the blueprint; typo'd blueprint path.","solutions":["Check the inner error to identify the failing blueprint source and cause.","Fix the blueprint path in the module config to point at a valid module directory.","Build/test the blueprint module standalone (cd blueprint && dagger develop) to surface its own errors.","Ensure the blueprint's dependencies and SDK resolve in the engine."],"exampleFix":"// before\nblueprint = \"./blueprints/deprecated-bp\" // removed\n// after\nblueprint = \"./blueprints/main-bp\" // valid module with dagger.json","handlingStrategy":"validation","validationCode":"// preflight: blueprint path in config resolves to a valid module\nif bp := cfg.Blueprint; bp != \"\" { if _, err := os.Stat(filepath.Join(root, bp, \"dagger.json\")); err != nil { return fmt.Errorf(\"blueprint %q invalid\", bp) } }","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"resolving blueprint module\") { /* surface blueprint-specific guidance to user */ }","preventionTips":["Verify blueprint config paths whenever the blueprint directory moves.","Build the blueprint module standalone after changes.","Keep blueprint SDK deps in sync with the engine."],"tags":["modules","blueprint","configuration"],"backgroundTag":"module-resolution-failed","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"}