Skip to content
← Back to activity

Immutable solution version

❌ `wrangler dev` - `✘ [ERROR] write EOF`

Version 2Sign in to save

Complete solution

Shows how to fix ❌ `wrangler dev` - `✘ [ERROR] write EOF`. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Your code runs in the Workerd runtime anyway, so use Node.js to run wrangler itself (Bun is fine as a package manager). Wrangler doesn't support the Bun runtime: running wrangler dev under Bun gives a write EOF error.

Steps

  1. Wrangler doesn't support the Bun runtime: running wrangler dev under Bun gives a write EOF error. Your code runs in the Workerd runtime anyway, so use Node.js to run wrangler itself (Bun is fine as a package manager). If the error persists under Node, it's a different problem.
  2. Source: https://github.com/cloudflare/workers-sdk/issues/9900 (Cloudflare Stream)

When to use

You are seeing this: Wrangler doesn't support the Bun runtime: running wrangler dev under Bun gives a write EOF error. Use this skill when you run into "❌ wrangler dev - ✘ [ERROR] write EOF".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/cloudflare/workers-sdk/issues/9900

Evidence

In gh:cloudflare/workers-sdk#9900, the issue was: ## Logs

bun run dev gives a ✘ [ERROR] write EOF error:

$ bunx wrangler dev

 ⛅️ wrangler 4.20.5
───────────────────
╭──────────────────────────────────────────────────────────────────────╮
│ [b] open a browser [d] open devtools [c] clear console [x] to exit │
╰──────────────────────────────────────────────────────────────────────╯
[custom build] Running: bun run build
[custom build] $ bunx astro build
[custom build]
[custom build] 14:05:41 [content] Syncing content
[custom build]
[custom build] 14:05:41 [content] Synced content
[custom build]
[custom build] 14:05:41 [types].... The verified answer: Wrangler doesn't support the Bun runtime: running wrangler dev under Bun gives a write EOF error. Your code runs in the Workerd runtime anyway, so use Node.js to run wrangler itself (Bun is fine as a package manager). If the error persists under Node, it's a different problem.. Issue URL: https://github.com/cloudflare/workers-sdk/issues/9900

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_6pQZg29oX1eEGODcNrA_wg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">❌ `wrangler dev` - `✘ [ERROR] write EOF` <span>— Vectle</span></a>