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

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

Open
long-woo opened this issue Apr 30, 2024 · 6 comments

Comments

@long-woo
Copy link

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

image
Copy link
Member

Could you provide a reproduction? 🙏

@long-woo
Copy link
Author

long-woo commented May 1, 2024

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

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

@danielroe
Copy link
Member

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

@long-woo
Copy link
Author

long-woo commented May 1, 2024

The problem has been reported to bun, oven-sh/bun#10729

@adydetra
Copy link

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/[email protected]/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/[email protected]/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/[email protected]/node_modules/nuxi/dist/chunks/prompt.mjs:408:18)
  at /C:/Users/dewag/AppData/Local/pnpm-cache/dlx/gfdanzckpqtfwcuomwggotfpc4/190166ee39d-fc/node_modules/.pnpm/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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 oven-sh/bun#10729 and nuxt/cli#384, this refers to problems with the nuxt telementry

@dontWatchMeCode
Copy link

dontWatchMeCode commented Jul 19, 2024

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:

  • starting nuxt from parent directory via make file with
...
dev:
	make dev-go &
	make dev-web &
	make dev-web-db &

	trap 'pkill -P $$; exit 0' INT
	wait

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants