workers-sdk
workers-sdk copied to clipboard
🐛 BUG: ERROR SystemError [ERR_TTY_INIT_FAILED] While installing using Git Bash
Which Cloudflare product(s) does this pertain to?
C3 (npm create cloudflare), Wrangler
What version(s) of the tool(s) are you using?
2.27.3[C3]
What version of Node are you using?
v18.18.1
What operating system and version are you using?
Windows 10
Describe the Bug
Description
While installing the latest Cloudflare setup using the following command in Git Bash:
npm create cloudflare@latest
I encountered the following error:
ERROR SystemError [ERR_TTY_INIT_FAILED]: TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor)
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
@Muhammad-Sarfaraz I've tried to test this locally, but am unable to reproduce. I'm not on Windows, but we do have E2E tests for Windows for this workflow.
Can you just check again to see if this is still an issue for you?
@Muhammad-Sarfaraz I've tried to test this locally, but am unable to reproduce. I'm not on Windows, but we do have E2E tests for Windows for this workflow.
Can you just check again to see if this is still an issue for you?
Still facing issues with Git Bash on my OS, could a warning be added for this? Use Powershell instead git bash?
After some internal discussion, it looks like we do something similar, where instead of warning, we just move to raw mode instead: https://github.com/cloudflare/workers-sdk/blob/3ee1353d317c0e137a14f3091b32eecd575cc7a4/packages/wrangler/src/utils/onKeyPress.ts#L22-L25
The advantage of this is that we could generalise it by creating a isTTYSupported() function.