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 packageworkflow-${uuid} so you can debug more easily too if/when things go southAn ID is automatically generated, but a user-provided ID can be specified (up to 64 characters 1). This can be useful when mapping Workflows to users, merchants or other identifiers in your system.We kept the tutorial simpler (because otherwise we get feedback that we’re introducing too much!)
HTTP 500/10001 workflows.api.error.internal_serverenvthis.envEnvvitest.configwranglercurl --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
}
};"'4.10vitest-pool-workersworkflow-${uuid}{
// 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
// ...
}