{
  "id": "go/vendor-directory-missing",
  "signature": "go: -mod=vendor is set but vendor directory is missing or incomplete",
  "signature_zh": "go: 设置了 -mod=vendor 但 vendor 目录缺失或不完整",
  "regex": "go:\\ \\-mod=vendor\\ is\\ set\\ but\\ vendor\\ directory\\ is\\ missing\\ or\\ incomplete",
  "domain": "go",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "The vendor directory does not exist or lacks required dependencies when using vendor mode.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用 vendor 模式时，vendor 目录不存在或缺少必需的依赖项。",
  "versions": [
    {
      "version": "1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.22",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.23",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Creating an empty vendor directory manually.",
      "why_fails": "Go expects the vendor directory to contain all dependencies; empty directory causes build failures.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "Setting GOFLAGS=-mod=mod to ignore vendor.",
      "why_fails": "This works but doesn't fix the vendor issue; it's a workaround, not a fix.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Run 'go mod vendor' to populate the vendor directory.",
      "success_rate": 0.95,
      "how": "Execute 'go mod vendor' in the module root to copy all dependencies.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use -mod=mod flag to bypass vendor mode.",
      "success_rate": 0.9,
      "how": "Build with 'go build -mod=mod' to use module cache instead of vendor.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-09-12",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}