DEV Community

Kenji Suzuki
Kenji Suzuki

Posted on

Cloudflare pagesを削除でエラー

2025-05-18

    throw new Error("Unable to fetch production deployment ID");
          ^

Error: Unable to fetch production deployment ID
    at getProductionDeploymentId (/Users/kenji/Downloads/delete-all-deployments/index.js:36:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async main (/Users/kenji/Downloads/delete-all-deployments/index.js:131:34)
Enter fullscreen mode Exit fullscreen mode

body.result.canonical_deployment.id の取得でエラーになってる。
必要なさそうなので、無視するように修正して動かした。

const prodDeploymentId = body.result.canonical_deployment?.id;
if (!prodDeploymentId) {
  //throw new Error("Unable to fetch production deployment ID");
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)