Skip to content

Instantly share code, notes, and snippets.

@mrtoxas
Created December 16, 2025 22:09
Show Gist options
  • Select an option

  • Save mrtoxas/765ed2955a649ed932b7fb3143fe722b to your computer and use it in GitHub Desktop.

Select an option

Save mrtoxas/765ed2955a649ed932b7fb3143fe722b to your computer and use it in GitHub Desktop.
Fix for Wrangler "write EOF" Error on Windows

Fix for Wrangler "write EOF" Error on Windows

Problem

Any project using Wrangler fails with write EOF error on Windows:

Astro with Cloudflare adapter:

pnpm astro dev
[@astrojs/cloudflare] An unhandled error occurred while running the "astro:server:setup" hook
write EOF
  Stack trace:
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:87:19)

Cloudflare Workers:

pnpm wrangler dev
X [ERROR] write EOF

Implicit Cause

Missing Visual C++ Redistributable runtime libraries required by Wrangler's native modules.

Solution

⚠️ Warning: Avoid solutions suggesting install_tools.bat from Node.js folder - it installs unnecessary tools (Python, Chocolatey, Windows SDK ~10GB+).

Install Visual C++ Redistributable instead:

Option 1: Via winget

winget install Microsoft.VCRedist.2015+.x64
winget install Microsoft.VCRedist.2015+.x86

Option 2: Direct download

Restart terminal and run your wrangler project again ✅

Size: ~25MB (vs ~3GB for Build Tools)

Tested on

  • Windows 10/11
  • Node.js 24.12.0
  • Wrangler 4.55.0
@treeder
Copy link

treeder commented Jan 30, 2026

Amazing, this works! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment