Open long-woo opened 4 months ago
Could you provide a reproduction? 🙏
https://github.com/long-woo/nuxt-bun-demo
The code for this repository was created using bunx nuxi@latest init nuxt-bun-demo
.
This is probably a bun issue if you are running the dev server with bun. Would you open an issue there instead? 🙏
The problem has been reported to bun, https://github.com/oven-sh/bun/issues/10729
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
Not sure is this is the same situation / related, but I was getting a similar error.
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](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
When I use
bun
to install dependencies, the following error appears: