I'm not sure if it's bun related.
When I using bun to run a .ts script to send a request (fetch) to my local dev worker, it throws this error:
ConnectionClosed: The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()
path: "http://localhost:8787/"
Then I make any change to worker code and hit save, the wrangler server shuts down and shows the error. (I write it down in below section)
Expected behavior
No errors.
Steps to reproduce
wrangler.toml:
name = "my-worker"
compatibility_date = "2023-12-01"
workers_dev = false
main = "index.ts"
Start the local dev worker by running bunx wrangler dev, the worker code:
Which Cloudflare product(s) does this pertain to?
Workers Runtime, Wrangler core
What version(s) of the tool(s) are you using?
3.62.0 [Wrangler]
What version of Node are you using?
20.15.0
What operating system and version are you using?
Mac Sonoma 14.5
Describe the Bug
Observed behavior
I'm not sure if it's
bun
related. When I usingbun
to run a.ts
script to send a request (fetch) to my local dev worker, it throws this error:Then I make any change to worker code and hit save, the wrangler server shuts down and shows the error. (I write it down in below section)
Expected behavior
No errors.
Steps to reproduce
wrangler.toml
:bunx wrangler dev
, the worker code:bun run my-script.ts
, the script:Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs