nuxt / telemetry

Nuxt Telemetry
MIT License
205 stars 23 forks source link

[ERROR] TTY initialization failed: uv_tty_init returned EINVAL (invalid argument). #134

Open long-woo opened 4 months ago

long-woo commented 4 months ago

When I use bun to install dependencies, the following error appears:

image
danielroe commented 4 months ago

Could you provide a reproduction? 🙏

long-woo commented 4 months ago

https://github.com/long-woo/nuxt-bun-demo

The code for this repository was created using bunx nuxi@latest init nuxt-bun-demo.

danielroe commented 4 months ago

This is probably a bun issue if you are running the dev server with bun. Would you open an issue there instead? 🙏

long-woo commented 4 months ago

The problem has been reported to bun, https://github.com/oven-sh/bun/issues/10729

adydetra commented 3 months ago

Btw this problem extends to all package managers, such as npx, pnpm dlx, bunx.

Example pnpm dlx nuxi@latest init nameapp

$ pnpm dlx nuxi@latest init nameapp

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

  at new SystemError (node:internal/errors:256:5)
  at new NodeError (node:internal/errors:367:7)
  at new WriteStream (node:tty:93:11)
  at ED.prompt (/C:/Users/dewag/AppData/Local/pnpm-cache/dlx/gfdanzckpqtfwcuomwggotfpc4/190166ee39d-fc/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/chunks/prompt.mjs:139:676)
  at select (/C:/Users/dewag/AppData/Local/pnpm-cache/dlx/gfdanzckpqtfwcuomwggotfpc4/190166ee39d-fc/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/chunks/prompt.mjs:298:6)
  at Module.prompt (/C:/Users/dewag/AppData/Local/pnpm-cache/dlx/gfdanzckpqtfwcuomwggotfpc4/190166ee39d-fc/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/chunks/prompt.mjs:408:18)
  at /C:/Users/dewag/AppData/Local/pnpm-cache/dlx/gfdanzckpqtfwcuomwggotfpc4/190166ee39d-fc/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1317:71
  at async Object.run (/C:/Users/dewag/AppData/Local/pnpm-cache/dlx/gfdanzckpqtfwcuomwggotfpc4/190166ee39d-fc/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/chunks/init.mjs:7501:29)
  at async runCommand$1 (/C:/Users/dewag/AppData/Local/pnpm-cache/dlx/gfdanzckpqtfwcuomwggotfpc4/190166ee39d-fc/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1648:16)
  at async runCommand$1 (/C:/Users/dewag/AppData/Local/pnpm-cache/dlx/gfdanzckpqtfwcuomwggotfpc4/190166ee39d-fc/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1639:11)

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

And if look at these two problems https://github.com/oven-sh/bun/issues/10729 and https://github.com/nuxt/cli/issues/384, this refers to problems with the nuxt telementry

dontWatchMeCode commented 2 months ago

Not sure is this is the same situation / related, but I was getting a similar error.

Screenshot from 2024-07-19 21-11-43

Reason:

dev-go: cd go && \ air -c .air.toml

dev-web: cd web && \ pnpm i && \ pnpm dev

dev-web-db: cd web && \ pnpm run db:all ...


- compatibilityDate (y/n) question did not work because of this setup

![Screenshot from 2024-07-19 21-11-03](https://github.com/user-attachments/assets/a586cab4-23a6-45e8-a2f6-1a193c50e1f4)

Works fine after settings the compatibilityDate

export default defineNuxtConfig({ ... compatibilityDate: '2024-07-19' });



- nuxt 3.12.4
- node v20.15.1
- pnpm 9.4.0
- kernel 6.9.9-arch1-1 / Liunx
- terms: xterm / gnome console