BuilderIO / BuilderIO/ai-shell

TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor)

Open
#84 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.3k
Forks
377
PR merge metrics
No merged PRs in 30d

Description

Hi! I keep getting the error shown below when running basic "ai" commands. Any idea what is might be? I'm running it on Windows 10, and Git bash. For some reason, it doesn't work on Powershell, but it does on cmd.exe

```
$ ai How do you declare a new route in a Flask server?

T AI Shell
|
o Your script:

powershell
write-host "To declare a new route in a Flask server, you can add the route decorator to a function definition within the Flask app instance, like this: @app.route('/new_route')" -ForegroundColor Green


|
o Explanation:

1. Initializes a PowerShell script.
2. Prints a message using the "write-host" command.
3. The message describes how to declare a new route in a Flask server by using the "@app.route('/new_route')" decorator.
4. The message is displayed in green text using the "-ForegroundColor" parameter.

✖ TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor)
at new SystemError (node:internal/errors:250:5)
at new NodeError (node:internal/errors:361:7)
at new WriteStream (node:tty:93:11)
at ED.prompt (file:///C:/Users/sacha/AppData/Roaming/npm/node_modules/@builder.io/ai-shell/node_modules/@clack/core/dist/index.mjs:9:693)
at Module.ee (file:///C:/Users/sacha/AppData/Roaming/npm/node_modules/@builder.io/ai-shell/node_modules/@clack/prompts/dist/index.mjs:28:7)
at runOrReviseFlow (file:///C:/Users/sacha/AppData/Roaming/npm/node_modules/@builder.io/ai-shell/dist/cli.mjs:1736:26)
at prompt (file:///C:/Users/sacha/AppData/Roaming/npm/node_modules/@builder.io/ai-shell/dist/cli.mjs:1732:9)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

ai-shell v1.0.1

Please open a Bug report with the information above:
https://github.com/BuilderIO/ai-shell/issues/new
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.