Skip to content

Track Cloudflare Workers runtime support blocked by node:vm dependency #2028

Description

@pranaygp

Workflow currently depends on Node's node:vm module for workflow execution (runInContext / VM contexts). That blocks Cloudflare Workers runtime implementations: even with nodejs_compat, Wrangler/Workers currently expose node:vm as a non-functional unenv stub, so calling vm.runInContext() fails with:

[unenv] vm.runInContext is not implemented yet!

This means community Cloudflare worlds can provide storage/queue backends, but a workbench deployed directly to Cloudflare Workers cannot run the actual Workflow e2e suite until Workflow has a runtime execution path that does not rely on node:vm.

Relevant community-world PRs:

Likely related work: @TooTallNate's QuickJS snapshot runtime PR, which appears to remove the node:vm dependency as a side effect:

I tested a minimal Wrangler worker locally with compatibility_flags = ["nodejs_compat"] that imports node:vm and calls vm.runInContext("1 + 1", vm.createContext({})); it returns a 500 with the unenv error above.

Once the QuickJS/snapshot runtime or another Worker-compatible execution path lands, we should be able to revisit Cloudflare Workers e2e coverage for these community worlds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions