Track Cloudflare Workers runtime support blocked by node:vm dependency
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 365
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 169
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the workflow execution path that uses node:vm and review the related QuickJS snapshot runtime and community-world PRs. Reproduce the failure with the minimal Wrangler worker described in the issue. Done means a Worker-compatible execution path no longer depends on the non-functional node:vm stub and Cloudflare Workers e2e coverage can be revisited.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100