{
  "id": "nextjs/missing-server-actions-endpoint",
  "signature": "Error: Server Actions are not supported in this environment. Ensure the server is configured to handle POST requests to the /_next/data/... endpoint.",
  "signature_zh": "错误：此环境不支持服务器操作。请确保服务器已配置为处理对 /_next/data/... 端点的 POST 请求。",
  "regex": "Server Actions are not supported in this environment",
  "domain": "nextjs",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Server Actions require the Next.js server to handle POST requests to the /_next/data/... endpoint, but the deployment (e.g., static export, custom server, or edge runtime) does not support this.",
  "root_cause_type": "generic",
  "root_cause_zh": "服务器操作要求 Next.js 服务器处理对 /_next/data/... 端点的 POST 请求，但部署（例如静态导出、自定义服务器或边缘运行时）不支持此操作。",
  "versions": [
    {
      "version": "Next.js 13.4+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Next.js 14.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Next.js 15.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "'use server' must be in a separate file or at the top of a server component; client components cannot directly export server actions.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This prevents the server from processing the action entirely, breaking the feature.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Server Actions are designed to be invoked via form actions or the useTransition hook, not raw fetch; this bypasses security and serialization.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure the deployment supports Server Actions: use Node.js runtime (not edge) and avoid static export. In next.config.js, set `experimental.serverActions: true` if on Next.js 13/14, or remove the flag in 15+. For static export, switch to API routes.",
      "success_rate": 0.85,
      "how": "Ensure the deployment supports Server Actions: use Node.js runtime (not edge) and avoid static export. In next.config.js, set `experimental.serverActions: true` if on Next.js 13/14, or remove the flag in 15+. For static export, switch to API routes.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Refactor the Server Action to an API route: create a route handler at app/api/action/route.ts and call it from the client with fetch.",
      "success_rate": 0.9,
      "how": "Refactor the Server Action to an API route: create a route handler at app/api/action/route.ts and call it from the client with fetch.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Ensure the deployment supports Server Actions: use Node.js runtime (not edge) and avoid static export. In next.config.js, set `experimental.serverActions: true` if on Next.js 13/14, or remove the flag in 15+. For static export, switch to API routes.",
    "Refactor the Server Action to an API route: create a route handler at app/api/action/route.ts and call it from the client with fetch."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#server-actions-with-static-export",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}