{"record":{"id":"e521a7f084c213b0","repo":"FuelLabs/sway","slug":"couldn-t-find-member-manifest-for","errorCode":null,"errorMessage":"Couldn't find member manifest for {}","messagePattern":"Couldn't find member manifest for (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"forc-pkg/src/pkg.rs","lineNumber":2303,"sourceCode":"        .iter()\n        .map(|(_, pkg)| pkg.bytecode.bytes.len())\n        .sum::<usize>();\n\n    println_action_green(\n        \"Finished\",\n        &format!(\n            \"{} [{}] in {:.2}s\",\n            profile_target_string(&build_profile.name, build_target),\n            format_bytecode_size(total_size),\n            build_start.elapsed().as_secs_f32()\n        ),\n    );\n    for (node_ix, built_package) in built_packages {\n        print_pkg_summary_header(&built_package);\n        let pinned = &graph[node_ix];\n        let pkg_manifest = manifest_map\n            .get(&pinned.id())\n            .ok_or_else(|| anyhow!(\"Couldn't find member manifest for {}\", pinned.name))?;\n        let output_dir = output_dir.clone().unwrap_or_else(|| {\n            default_output_directory(pkg_manifest.dir()).join(&build_profile.name)\n        });\n        // Output artifacts for the built package\n        if let Some(outfile) = &binary_outfile {\n            built_package.write_bytecode(outfile.as_ref())?;\n        }\n        // Generate debug symbols if explicitly requested via -g flag or if in debug build\n        if debug_outfile.is_some() || build_profile.name == BuildProfile::DEBUG {\n            let debug_path = debug_outfile\n                .as_ref()\n                .map(|p| output_dir.join(p))\n                .unwrap_or_else(|| output_dir.join(\"debug_symbols.obj\"));\n            built_package.write_debug_info(&debug_path)?;\n        }\n\n        if let Some(hex_path) = hex_outfile {\n            let hexfile_path = output_dir.join(hex_path);","sourceCodeStart":2285,"sourceCodeEnd":2321,"githubUrl":"https://github.com/FuelLabs/sway/blob/47e5e902faa42baf652dd6a0c88cd23390c1a614/forc-pkg/src/pkg.rs#L2285-L2321","documentation":"After building, forc iterates each built package node and looks up its manifest in manifest_map keyed by the pinned package id. This failing means the dependency graph contains a node whose manifest was never collected during fetching - an internal inconsistency between plan.graph and plan.manifest_map rather than a user configuration problem.","triggerScenarios":"Calling pkg::build with a BuildPlan constructed by hand, reused after mutation, or reused across forc versions - so a graph node exists without a corresponding manifest_map entry.","commonSituations":"Tooling that caches/reuses BuildPlans across forc upgrades; a corrupted .forc cache after an interrupted fetch; rare on stock forc invocations.","solutions":["Recreate the BuildPlan freshly (BuildPlan::from_lockfile / from_manifests) instead of reusing a cached or hand-built one","Run forc clean (or delete the .forc directory) and rebuild so all manifests are re-fetched","If you link forc-pkg programmatically, align its version with the forc binary in use","If it reproduces with stock forc build, report it with the manifest and graph details"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match pkg::build(&plan, ...) {\n    Ok(pkgs) => pkgs,\n    Err(e) if e.to_string().contains(\"Couldn't find member manifest\") => {\n        // internal inconsistency: rebuild the plan from scratch and retry once\n        let plan = BuildPlan::from_manifests(&manifest_file, offline)?;\n        return pkg::build(&plan, ...);\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Always construct BuildPlan freshly per invocation instead of caching it","Do not hand-assemble graph nodes without inserting matching manifests","If this fires, dump plan.manifest_map keys vs graph node ids to report the inconsistency"],"tags":["rust","forc","internal","build-plan"],"backgroundTag":null,"analyzedSha":"47e5e902faa42baf652dd6a0c88cd23390c1a614","analyzedAt":"2026-08-16T07:57:45.555Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}