Skip to content

非公式本サイトは非公式の日本語ドキュメントであり、Cloudflare 公式サイトではありません。最新情報はdevelopers.cloudflare.comをご確認ください。

ビルドのトラブルシューティング

最終更新 Markdown で表示Agent セットアップ

このガイドでは、ビルドエラーの特定と解消、および Workers Builds のデプロイ過程でよく起きる問題の切り分けを説明します。

ビルド履歴を見るには、Cloudflare ダッシュボードで Worker プロジェクトを開き、Deployment を選択し、ページ下部の View Build History を選択して、見たいビルドを選びます。ビルドを再実行するには、ビルド横の省略記号を選び、Retry build を選択します。または、Build Details ページの Retry build を選択します。

既知の問題と制限

ビルドログに出るよくあるビルドエラーや、一般的な問題と対処です。

Worker 名の要件

✘ [ERROR] The name in your Wrangler configuration file (<Worker name>) must match the name of your Worker. Please update the name field in your Wrangler configuration file.

Git リポジトリを Workers プロジェクトに接続するとき、Cloudflare ダッシュボード上の Worker 名は、指定したルートディレクトリにある Wrangler 設定ファイルの name 引数と一致する必要があります。一致しない場合は、Wrangler 設定ファイルの name フィールドを、ダッシュボード上の Worker 名に合わせて更新します。

ビルドシステムは、Wrangler 設定ファイルの name 引数で、Cloudflare のグローバルネットワークにデプロイする Worker を決めます。この要件で、ダッシュボード上の Worker 名とデプロイされる Worker の一貫性を保ちます。

Wrangler 設定ファイルがない

✘ [ERROR] Missing entry-point: The entry-point should be specified via the command line (e.g. wrangler deploy path/to/script) or the main config field.

このエラーが出る場合、ルートディレクトリに Wrangler 設定ファイルがないことがほとんどです。Settings > Build > Build Configuration でルートディレクトリを更新するか、指定したディレクトリに Wrangler 設定ファイル を追加します。

誤った account_id

Could not route to /client/v4/accounts/<Account ID>/workers/services/<Worker name>, perhaps your object identifier is invalid? [code: 7003]

このエラーが出る場合、Wrangler 設定ファイルの account_id が別アカウントのものであることがほとんどです。account_id 引数を削除するか、Workers & Pages OverviewAccount Details にある自分のアカウントの account_id に更新します。

古い API トークン

Failed: The build token selected for this build has been deleted or rolled and cannot be used for this build. Please update your build token in the Worker Builds settings and retry the build.

Build Configuration 設定の API Token ドロップダウンには、編集、削除、またはロール済みの古いトークンが表示されることがあります。古いトークンが原因のエラーが出たら、新しい API Token を作成し、ビルドに選択します。

ビルドがタイムアウトした

Build was timed out

ビルド時間の上限は 20 分です。これを超えるとビルドは打ち切られ、上記のエラーログが出ます。詳しくは Workers Builds の制限 を参照してください。

Git 連携の問題

Git 連携に関連するエラーが出る場合は、Cloudflare から GitHub または GitLab 連携へのアクセスを削除し、GitHub または GitLab 連携を再インストールしてみてください。

追加のサポート

ほかの問題を見つけた場合やフィードバックがある場合は、Cloudflare Developers Discord で連絡してください。

役に立ちましたか?