2025-05-22
const mf = new Miniflare({
modules: true,
script,
d1Databases: { D1: "d1-local" },
d1Persist: `${path}/d1`,
r2Buckets: { R2: "r2-local", R2_POST_LOG: "r2-post-log-local" },
r2Persist: `${path}/r2`,
workflows: {
WF_STORE_POST_LOG: {
name: "StorePostLogWorkflow",
className: "StorePostLogWorkflowEntrypoint",
},
},
});
で動いていたが、
Worker "workflows:StorePostLogWorkflow"'s binding "USER_WORKFLOW" refers to service "core:user:annoucning-writer" with a named entrypoint "StorePostLogWorkflowEntrypoint", but "core:user:annoucning-writer" has no such named entrypoint.
Worker "workflows:StorePostLogWorkflow"'s binding "USER_WORKFLOW" refers to service "core:user:annoucning-writer" with a named entrypoint "StorePostLogWorkflowEntrypoint", but "core:user:annoucning-writer" has no such named entrypoint.
Worker "workflows:StorePostLogWorkflow"'s binding "USER_WORKFLOW" refers to service "core:user:annoucning-writer" with a named entrypoint "StorePostLogWorkflowEntrypoint", but "core:user:annoucning-writer" has no such named entrypoint.
というエラーになった
- 変わったところは
wrangler.jsonc
に workflows の値を設定したこと - 消したら動いた
- 元々は env の下に設定していたが、
wrangler dev
で複数指定するときに--env オプションが効かないのでルートにもってきた - miniflare から
wrangler.jsonc
が参照されている? - https://github.com/cloudflare/workers-sdk/issues/7414
-
wrangler.local.jsonc
など、設定毎に分けることにした