workers-sdk: ๐Ÿ› BUG: Cloudflare worker ``` wrangler dev``` local development not working

Which Cloudflare product(s) does this pertain to?

Workers for Platforms, Workers/Other, Wrangler

What version of Wrangler are you using?

3.0.0

What operating system are you using?

Linux (Ubuntu 22.04) (Node v18.16.0)

Describe the Bug

Local Development of Cloudflare worker is giving error

(wrangler version 3.0.0), (Linux), (Ubuntu 22.04), (Node LTS v18.16.0)

  • Local development not working wrangler dev

  • Error:

/home/**/Projects/WebStormProjects/testing/node_modules/wrangler/wrangler-dist/cli.js:30632
            throw a;
            ^

Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)
    at writeGeneric (node:internal/stream_base_commons:151:3)
    at Socket._writeGeneric (node:net:930:11)
    at Socket._write (node:net:942:8)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at Writable.write (node:internal/streams/writable:337:10)
    at Runtime.updateConfig (/home/**/Projects/WebStormProjects/testing/node_modules/miniflare/dist/src/index.js:5120:26)
    at async #assembleAndUpdateConfig (/home/**/Projects/WebStormProjects/testing/node_modules/miniflare/dist/src/index.js:9130:23)
    at async #init (/home/**/Projects/WebStormProjects/testing/node_modules/miniflare/dist/src/index.js:8894:5)
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: -32,
  code: 'EPIPE',
  syscall: 'write'
} 
  • But remote development works perfectly Fine wrangler dev --remote

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 13
  • Comments: 17 (4 by maintainers)

Most upvoted comments

For Arch Linux users:

yay -Sy extra/libc++ aur/llvm-libunwind

Hey everyone! ๐Ÿ‘‹ Wanted to give an update on this issue. Weโ€™ve now got builds working with statically linked libc++ that should support older Linux distributions and macOS versions. Just having a few issues getting some tests to pass, but hoping to resolve them soon. ๐Ÿ‘

I have the same problem on Arch Linux (node v19.9.0). It was working on wrangler 2.20.0 but is now broken on wrangler 3.0.0.

I found a similar issue further down the list of issues, #3262. In one of the comments @mrbbot writes

Hey! ๐Ÿ‘‹ Thanks for raising this. As pointed out earlier in the thread, the workerd npm distribution is currently incompatible with Debian 11 โ€œBullseyeโ€, so wonโ€™t work with any distro based off that (e.g. Ubuntu 20.04). Debian 12 โ€œBookwormโ€ based distros (e.g. Ubuntu 22.04) should work, provided you apt install libc++1. Weโ€™re working on getting a statically linked version of workerd published that should work on older Linux versions. No timeline on when this will be available though. ๐Ÿ‘

I happen to be running Ubuntu 22.04 in WSL2. I installed libc++1 and now I am able to get past the errors I was seeing and view the pages site locally.

@tforster ok great and thanks. I did install libc++1 before too, but just on 20.04. Did install it for 22.04 again and now wrangle 3.0 is running fine.

@jiripospisil This did not work for me, can you mention which versions of each you are using?

Iโ€™m getting this error on windows 10 (no wsl) error_wrangler