Wrangler “write EOF” on Windows: The Actual Fix
Source: Dev.to
Problem
Developers using Cloudflare Wrangler (or Astro with the Cloudflare adapter) on Windows may encounter a cryptic “write EOF” error when trying to start their project.
Investigation
-
Initial workaround – Running
install_tools.bat(as suggested in a GitHub comment) resolved the error, but it installed many unnecessary components:- Python
- Visual Studio core files
- Various SDK files
-
Targeted approach – The most logical component seemed to be Microsoft.VisualStudio.2022.BuildTools. Installing it via
winget:winget install Microsoft.VisualStudio.2022.BuildTools --override "--wait --quiet --add Microsoft.VisualStudio.Workload.VCTools"This also fixed the error but still pulled in a large set of extra tools (VS Core, editor fonts, parts of the Windows SDK).
-
Minimal test – After cleaning the system, the only remaining Microsoft packages were the Visual C++ 2015–2022 Redistributables (both x64 and x86). Removing everything else (including the Build Tools) still left the error absent.
-
Verification – Uninstalling the VC++ Redistributables caused the error to return immediately. Re‑installing them fixed it again. A fresh Windows VM confirmed that only the VC++ Redistributable is required; no Build Tools, SDKs, or Python are needed.
Solution
Install the Microsoft Visual C++ 2015–2022 Redistributable (both x64 and x86) on Windows.
# Download and install the redistributables from Microsoft:
# https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
After installing these runtimes, Wrangler starts normally and the “write EOF” error disappears.
Why This Works
Wrangler depends on native Node.js modules that require the Visual C++ runtime on Windows. When the runtime is missing, the low‑level process communication fails, resulting in a generic “write EOF” stream error rather than a clear missing‑dependency message. Providing the VC++ runtime satisfies this requirement.
Conclusion
The extensive solutions found online (e.g., running install_tools.bat or installing full Visual Studio Build Tools) are unnecessary and clutter the system. Installing only the Microsoft Visual C++ 2015–2022 Redistributable (x64 and x86) is the minimal, clean fix for the “write EOF” error in Cloudflare Wrangler on Windows.
You can see a concise summary of the problem and the steps taken in my GitHub gist.