Wrangler dev server failing to start: ERROR write EOF

I have an Astro + SolidJS project with worker code in app/api/ and static files in app/src/ When i run bun run dev I get an error and server does not start:
21 Replies
Roman
RomanOP6mo ago
My configuration: package.json
{
"name": "beta",
"type": "module",
"private": true,
"scripts": {
"build": "bunx astro build",
"deploy": "bunx wrangler deploy",
"dev": "bunx wrangler dev"
},
"devDependencies": {
"@astrojs/cloudflare": "^12.5.5",
"@astrojs/solid-js": "^5.1.0",
"@types/bun": "latest",
"astro": "^5.9.4",
"wrangler": "^4.20.3"
},
"peerDependencies": {
"typescript": "^5.8.3"
},
"dependencies": {
"solid-js": "^1.9.7"
}
}
{
"name": "beta",
"type": "module",
"private": true,
"scripts": {
"build": "bunx astro build",
"deploy": "bunx wrangler deploy",
"dev": "bunx wrangler dev"
},
"devDependencies": {
"@astrojs/cloudflare": "^12.5.5",
"@astrojs/solid-js": "^5.1.0",
"@types/bun": "latest",
"astro": "^5.9.4",
"wrangler": "^4.20.3"
},
"peerDependencies": {
"typescript": "^5.8.3"
},
"dependencies": {
"solid-js": "^1.9.7"
}
}
wrangler.jsonc
{
"name": "beta",
"compatibility_date": "2025-06-18",
"account_id": "9cb2e2e27c4416de8fa3465ed0ee8deb",
"workers_dev": true,

"assets": {
"directory": "./dist",
"not_found_handling": "404-page",
"run_worker_first": ["/api/*"]
},

"main": "api/index.ts",

"build": {
"command": "bun run build",
"cwd": "."
},

"observability": { "logs": { "enabled": true } }
}
{
"name": "beta",
"compatibility_date": "2025-06-18",
"account_id": "9cb2e2e27c4416de8fa3465ed0ee8deb",
"workers_dev": true,

"assets": {
"directory": "./dist",
"not_found_handling": "404-page",
"run_worker_first": ["/api/*"]
},

"main": "api/index.ts",

"build": {
"command": "bun run build",
"cwd": "."
},

"observability": { "logs": { "enabled": true } }
}
astro.config.mjs
import { defineConfig } from "astro/config";
import solid from "@astrojs/solid-js";

export default defineConfig({
output: "static",
integrations: [solid()],
});
import { defineConfig } from "astro/config";
import solid from "@astrojs/solid-js";

export default defineConfig({
output: "static",
integrations: [solid()],
});
Roman
RomanOP6mo ago
When i run bun run dev I get an error ✘ [ERROR] write EOF and server does not start
Roman
RomanOP6mo ago
Just running bun run build on its own works:
$ bunx astro build
21:12:56 [content] Syncing content
21:12:56 [content] Synced content
21:12:56 [types] Generated 115ms
21:12:56 [build] output: "static"
21:12:56 [build] mode: "static"
21:12:56 [build] directory: C:\Users\roman\OneDrive\Personal\dev\rmandotdev\beta\dist\
21:12:56 [build] Collecting build info...
21:12:56 [build] ✓ Completed in 171ms.
21:12:56 [build] Building static entrypoints...
21:13:00 [vite] ✓ built in 3.59s
21:13:00 [build] ✓ Completed in 3.69s.

building client (vite)
21:13:01 [vite] ✓ 9 modules transformed.
21:13:01 [vite] dist/_astro/App.DE9fhXGa.js 3.66 kB │ gzip: 1.63 kB
21:13:01 [vite] dist/_astro/client.BuoyDF4w.js 5.59 kB │ gzip: 2.43 kB
21:13:01 [vite] dist/_astro/web.mOnDwdHT.js 12.37 kB │ gzip: 4.98 kB
21:13:01 [vite] ✓ built in 1.36s

generating static routes
21:13:02 ▶ src/pages/index.astro
21:13:02 └─ /index.html (+107ms)
21:13:02 ✓ Completed in 320ms.

21:13:02 [build] 1 page(s) built in 5.71s
21:13:02 [build] Complete!
$ bunx astro build
21:12:56 [content] Syncing content
21:12:56 [content] Synced content
21:12:56 [types] Generated 115ms
21:12:56 [build] output: "static"
21:12:56 [build] mode: "static"
21:12:56 [build] directory: C:\Users\roman\OneDrive\Personal\dev\rmandotdev\beta\dist\
21:12:56 [build] Collecting build info...
21:12:56 [build] ✓ Completed in 171ms.
21:12:56 [build] Building static entrypoints...
21:13:00 [vite] ✓ built in 3.59s
21:13:00 [build] ✓ Completed in 3.69s.

building client (vite)
21:13:01 [vite] ✓ 9 modules transformed.
21:13:01 [vite] dist/_astro/App.DE9fhXGa.js 3.66 kB │ gzip: 1.63 kB
21:13:01 [vite] dist/_astro/client.BuoyDF4w.js 5.59 kB │ gzip: 2.43 kB
21:13:01 [vite] dist/_astro/web.mOnDwdHT.js 12.37 kB │ gzip: 4.98 kB
21:13:01 [vite] ✓ built in 1.36s

generating static routes
21:13:02 ▶ src/pages/index.astro
21:13:02 └─ /index.html (+107ms)
21:13:02 ✓ Completed in 320ms.

21:13:02 [build] 1 page(s) built in 5.71s
21:13:02 [build] Complete!
Roman
RomanOP6mo ago
Running bun run deploy also works:
Razboy20
Razboy206mo ago
If you use pnpm/yarn/npm, does the issue still persist? (including/mainly dependency management)
Super Wang
Super Wang6mo ago
=
Roman
RomanOP6mo ago
I’ll check Is it about lock files or node_modules? or about runnning with npx instead of bunx or something else?
Razboy20
Razboy206mo ago
node modules, not lock files although the lock file is what determines what goes inside node modules
Roman
RomanOP6mo ago
alright, i'll try btw is there a way to specify on what port should the worker run?
Razboy20
Razboy206mo ago
--port <number>
Roman
RomanOP6mo ago
bunx wrangler dev --port <number>, right?
Razboy20
Razboy206mo ago
yup for reference, you can check all the flags with bunx wrangler dev --help
Roman
RomanOP6mo ago
Okay, it looks like the issue exists without any frameworks
C:\Users\roman\OneDrive\Personal\dev\rmandotdev\www>bunx wrangler dev

⛅️ wrangler 4.20.3
───────────────────
╭──────────────────────────────────────────────────────────────────────╮
│ [b] open a browser [d] open devtools [c] clear console [x] to exit │
╰──────────────────────────────────────────────────────────────────────╯
⎔ Starting local server...

✘ [ERROR] write EOF


If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
? Would you like to report this error to Cloudflare? Wrangler's output and the error details will be shared with the Wrangler team to help us diagnose and fix the issue. » (Y/n)[mf:info] ✨ Parsed 4 valid redirect rules.
[mf:info] The redirect rule /discord → 301 https://dsc.gg/gameroman could be made more performant by bringing it above any lines with splats or placeholders.
[mf:info] The redirect rule /github → 301 https://github.com/gameroman could be made more performant by bringing it abov√ Would you like to report this error to Cloudflare? Wrangler's output and the error details will be shared with the Wrangler team to help us diagnose and fix the issue. ... yes
🪵 Logs were written to "C:\Users\roman\AppData\Roaming\xdg.config\.wrangler\logs\wrangler-2025-06-19_21-26-26_019.log"
C:\Users\roman\OneDrive\Personal\dev\rmandotdev\www>bunx wrangler dev

⛅️ wrangler 4.20.3
───────────────────
╭──────────────────────────────────────────────────────────────────────╮
│ [b] open a browser [d] open devtools [c] clear console [x] to exit │
╰──────────────────────────────────────────────────────────────────────╯
⎔ Starting local server...

✘ [ERROR] write EOF


If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
? Would you like to report this error to Cloudflare? Wrangler's output and the error details will be shared with the Wrangler team to help us diagnose and fix the issue. » (Y/n)[mf:info] ✨ Parsed 4 valid redirect rules.
[mf:info] The redirect rule /discord → 301 https://dsc.gg/gameroman could be made more performant by bringing it above any lines with splats or placeholders.
[mf:info] The redirect rule /github → 301 https://github.com/gameroman could be made more performant by bringing it abov√ Would you like to report this error to Cloudflare? Wrangler's output and the error details will be shared with the Wrangler team to help us diagnose and fix the issue. ... yes
🪵 Logs were written to "C:\Users\roman\AppData\Roaming\xdg.config\.wrangler\logs\wrangler-2025-06-19_21-26-26_019.log"
Roman
RomanOP6mo ago
And here are the logs:
Roman
RomanOP6mo ago
I'll try with npm now
Roman
RomanOP6mo ago
Alright, @Razboy20 just tested with a new project using npm and it has the same issue:
C:\Users\roman\OneDrive\Personal\dev\rmandotdev\temp\temp>npx wrangler dev

⛅️ wrangler 4.20.3
───────────────────
╭──────────────────────────────────────────────────────────────────────╮
│ [b] open a browser [d] open devtools [c] clear console [x] to exit │
╰──────────────────────────────────────────────────────────────────────╯
⎔ Starting local server...

✘ [ERROR] write EOF


If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
√ Would you like to report this error to Cloudflare? Wrangler's output and the error details will be shared with the Wrangler team to help us diagnose and fix the issue. ... yes
🪵 Logs were written to "C:\Users\roman\AppData\Roaming\xdg.config\.wrangler\logs\wrangler-2025-06-19_21-52-26_920.log"
C:\Users\roman\OneDrive\Personal\dev\rmandotdev\temp\temp>npx wrangler dev

⛅️ wrangler 4.20.3
───────────────────
╭──────────────────────────────────────────────────────────────────────╮
│ [b] open a browser [d] open devtools [c] clear console [x] to exit │
╰──────────────────────────────────────────────────────────────────────╯
⎔ Starting local server...

✘ [ERROR] write EOF


If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
√ Would you like to report this error to Cloudflare? Wrangler's output and the error details will be shared with the Wrangler team to help us diagnose and fix the issue. ... yes
🪵 Logs were written to "C:\Users\roman\AppData\Roaming\xdg.config\.wrangler\logs\wrangler-2025-06-19_21-52-26_920.log"
Roman
RomanOP6mo ago
Roman
RomanOP6mo ago
Should I open a GitHub issue or not? I've made a GtiHub issue https://github.com/cloudflare/workerd/issues/4391 Maybe i should've made it on cloudflare/workers-sdk instead, but I'm not sure
Uncle Moses
Uncle Moses3mo ago
did you manage to solve this error please. 🙏
Roman
RomanOP3mo ago
It does seem to be working for me now, but I don’t think I have changed anything So either they’ve fixed it or something else changed, so I don’t know
Uncle Moses
Uncle Moses3mo ago
Good for you mate, cause I’ve been stuck here for ages now…. It’s so annoying… @Roman I have found the answer to this, run this script in your terminal—-> install_tools.bat

Did you find this page helpful?