Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: ERROR SystemError [ERR_TTY_INIT_FAILED] While installing using Git Bash #6789

Open
Muhammad-Sarfaraz opened this issue Sep 20, 2024 · 3 comments
Labels
bug Something that isn't working

Comments

@Muhammad-Sarfaraz
Copy link

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)

image

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@Muhammad-Sarfaraz Muhammad-Sarfaraz added the bug Something that isn't working label Sep 20, 2024
@andyjessop
Copy link
Contributor

@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?

@andyjessop andyjessop added the awaiting reporter response Needs clarification or followup from OP label Oct 7, 2024
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Oct 8, 2024
@Muhammad-Sarfaraz
Copy link
Author

@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?

@lrapoport-cf lrapoport-cf added awaiting Cloudflare response Awaiting response from workers-sdk maintainer team and removed awaiting reporter response Needs clarification or followup from OP labels Oct 14, 2024
@andyjessop
Copy link
Contributor

After some internal discussion, it looks like we do something similar, where instead of warning, we just move to raw mode instead:

if (isInteractive()) {
readline.emitKeypressEvents(stream);
process.stdin.setRawMode(true);
}

The advantage of this is that we could generalise it by creating a isTTYSupported() function.

@andyjessop andyjessop moved this from Untriaged to Backlog in workers-sdk Nov 4, 2024
@andyjessop andyjessop removed the awaiting Cloudflare response Awaiting response from workers-sdk maintainer team label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
Status: Backlog
Development

No branches or pull requests

3 participants