cloudflare / workers-sdk

โ›…๏ธ Home to Wrangler, the CLI for Cloudflare Workersยฎ
https://developers.cloudflare.com/workers/
Apache License 2.0
2.7k stars 709 forks source link

๐Ÿ› BUG: Error: write EOF at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) #3698

Closed fairok closed 9 months ago

fairok commented 1 year ago

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

3.4.0

What version of Node are you using?

18.16.0

What operating system are you using?

Windows 11

Describe the Bug

I just run to preview the nuxt3 project locally:

npx wrangler dev .output/server/index.mjs --site .output/public --local --port 8833

and got the error

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

Node.js v18.16.0 PS D:\Work\Dev\mx_ys_shop_dawn> npx wrangler dev .output/server/index.mjs --site .output/public --local --port 8833 โ›…๏ธ wrangler 3.4.0

wrangler dev now uses local mode by default, powered by ๐Ÿ”ฅ Miniflare and ๐Ÿ‘ท workerd. To run an edge preview session for your Worker, use wrangler dev --remote โ–ฒ [WARNING] --local is no longer required and will be removed in a future version.

wrangler dev now uses the local Cloudflare Workers runtime by default. ๐ŸŽ‰

โŽ” Starting local server... *** Received structured exception #0xe06d7363: (unknown exception code); stack: 7ffe46bd2bdb 7ffe3635671f 7ff6f26cbc31 7ff6f26bd4a0 7ff6f26de116 7ff6f26ddd60 7ff6f1881480 7ff6f1881179 7ff6f3521ebf 7ffe488f559f 7ffe4948485a โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€> โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ [b] open a browser, [d] open Devtools, [l] turn off local mode, [c] clear console, [x] to exit โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€> โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ D:\Work\Dev\mx_ys_shop_dawn\node_modules\wrangler\wrangler-dist\cli.js:30632 throw a; ^

Error: write EOF at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) Emitted 'error' event on Socket instance at: at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4095, code: 'EOF', syscall: 'write' }

Node.js v18.16.0

maikelordaz commented 1 year ago

Did you find a solution to this?

RishiRathodOfficials commented 1 year ago

I'm also facing same issue

maikelordaz commented 1 year ago

For me it was a corrupted .DLL file. During an automatic windows update my internet went down for a moment and did not install it correctly and received the warning when I started my computer again and downloaded the .DLL file from the warning. A quick way to continue developing is using WSL as is Linux based and virtualized I could continue doing everything I needed until I solved it

nienow commented 11 months ago

This is happening for me as well. Windows 11 - Node v20.9.0. I was simply using the Hello World example worker for testing. It works great when using "--remote" flag.

mrbbot commented 10 months ago

Hey! ๐Ÿ‘‹ Apologies for the delayed response here. It looks like this is an issue with workerd. The Received structured exception is the important part here, Error: write EOF is likely because Miniflare can't pass the generated workerd config. Would you be able to try upgrading to the latest version of wrangler?

nienow commented 10 months ago

I can confirm that its now working for me on the latest version of wrangler.

lrapoport-cf commented 9 months ago

great! we'll close the issue now, but @fairok if you are still experiencing problems, please feel free to open a new issue referencing this one and include any additional or updated information. thanks!

nghianguyen119 commented 6 months ago

The issue might be due to the lack of necessary tools to compile native modules on your system.

You can resolve by running the install_tools.bat in the directory of your nodejs. For example for nvm user, you can find in C:\Users\[Username]\AppData\[Roaming/local]\nvm\[nodeversion]

piyushyadav0191 commented 3 months ago

@nghianguyen119 Thanks, It worked after running install_tools.bat

rajeshtadi357 commented 1 month ago

Im also facing the same error Write :EOF , while running the npm run dev command to run the server locally after intalling install_tools.bat it worked, now server is running on the port 8787

adityaparghi commented 1 month ago

hey i am facing this issue Error: write EOF at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:95:16) at WriteWrap.callbackTrampoline (node:internal/async_hooks:130:17) { errno: -4095, code: 'EOF', syscall: 'write' }

can any one help me

rajeshtadi357 commented 1 month ago

I also faced the same issue, got resolved after running install_tools.bat...try running this .. it will be solved

or re-install nodejs, and tick the checkbox containing additional tools while installing