Show your `wrangler` config and code.
Show your
wrangler config and code.wrangler dev invocation. wrangler dev run:

HTTP 500/10001 workflows.api.error.internal_serverenv inside a workflow context? we would like to use our KV bindingsthis.env Env type as a parameter to your Workflow class: https://developers.cloudflare.com/workflows/build/workers-api/#workflowentrypoint

vitest.config file as I have the workflow in a separate folder? The durable object class gets resolved without issue, but not the workflow.

wrangler are you using? Make sure it’s the latest (4.8.0 or later).



4.10) but still getting the same errors for running my tests when introducing the workflow
vitest-pool-workers package{
// Other info
// ...
"compatibility_date": "2025-03-17",
"compatibility_flags": ["nodejs_compat"],
"observability": {
"enabled": true
},
"durable_objects": {
"bindings": [
{
"name": "TASKS",
"class_name": "Task"
}
]
},
"migrations": [
{
"new_sqlite_classes": ["Task"],
"tag": "v1"
}
],
"workflows": [
{
"binding": "TASK_WORKFLOW",
"class_name": "TaskWorkflow",
"name": "task-workflow"
}
],
// Some other bindings with Queues, Services and Rules
// ...
}curl --location --request PUT 'https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workers/scripts/$SCRIPT_NAME' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Cookie: __cf_bm=BSfapaLrMo7TSHNizMMBSDc1VeGd1iZ6NaF3xErfwlM-1744368032-1.0.1.1-nBYMctsOJZrcH3agouhImrXCYRzeXROKf6uvM4XyDAogoTECkKmo4Fm7q0Vd.XqD6wF1q8urMUiYbpy68QKLd_Opw9i2Y01dtzBoyALEr8Y; __cflb=0H28vgHxwvgAQtjUGUFqYFDiSDreGJnUm6uGcveaJY5; _cfuvid=O4jwRzC_mJfhR25Kh5F.1IIpmpts7JbjH_QwbrurGgk-1744345016081-0.0.1.1-604800000' \
--form 'metadata="{ \"compatibility_date\": \"2021-01-01\", \"compatibility_flags\": [ \"nodejs_compat\" ], \"main_module\": \"worker.ts\" } "' \
--form 'script="export class MyWorkflow extends WorkflowEntrypoint<Env, Params> {
async run(event: WorkflowEvent<Params>, step: WorkflowStep) {
// Steps here
let someComputedState = step.do(\"my step\", async () => { })
// Optional: return state from our run() method
return someComputedState
}
};"'