Open gvilums opened 3 months ago
Hi, this might be related, bun install
in my nuxt project also failed. It's also failing at nuxt prepare
step. I'm using bun version 1.1.3
Downgrade to 1.0.36
fix this
The issue is due to console input. The command prompts to select if the user wants to opt-in for nuxt telemetry.
Workaround: First install with node so you can answer the telemetry prompt, then you should be able to use bun as usual
I'm still getting this error in Bun v1.1.6 (e58d67b4)
when running bunx nuxi@latest init project
:
✔ Which package manager would you like to use?
bun
◐ Installing dependencies... 5:23:03 PM
bun install v1.1.6 (e58d67b4)
$ nuxt prepare
ERROR (node:58315) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated. 5:23:11 PM
(Use node --trace-deprecation ... to show where the warning was created)
ℹ Nuxt collects completely anonymous data about usage. 5:23:12 PM
This will help us improve Nuxt developer experience over time.
Read more on https://github.com/nuxt/telemetry
ERROR TTY initialization failed: uv_tty_init returned EINVAL (invalid argument) 5:23:12 PM
at new WriteStream (node:tty:93:11)
at sD.prompt (node_modules/consola/dist/chunks/prompt.mjs:141:676)
at confirm (node_modules/consola/dist/chunks/prompt.mjs:251:6)
at Module.prompt (node_modules/consola/dist/chunks/prompt.mjs:404:18)
at node_modules/consola/dist/shared/consola.36c0034f.mjs:617:71
at async ensureUserconsent (node_modules/@nuxt/telemetry/dist/shared/telemetry.023ac76b.mjs:26:20)
at async setup (node_modules/@nuxt/telemetry/dist/module.mjs:363:74)
at async normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:2112:17)
at async installModule (node_modules/@nuxt/kit/dist/index.mjs:2415:95)
at async initNuxt (node_modules/nuxt/dist/index.mjs:4233:7)
at async loadNuxt (node_modules/nuxt/dist/index.mjs:4331:5)
at async loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:2570:19)
at async Object.run (node_modules/nuxi/dist/chunks/prepare.mjs:53:18)
at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.9edf0930.mjs:1648:16)
at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.9edf0930.mjs:1639:11)
at async runMain$1 (node_modules/nuxi/dist/shared/nuxi.9edf0930.mjs:1777:7)
ERROR TTY initialization failed: uv_tty_init returned EINVAL (invalid argument) 5:23:12 PM
error: postinstall script from "nuxt-app" exited with 1
ERROR Error: Command failed with exit code 1: bun install
Any ideas to solve this?
@koddr I put a workaround, but there is no definitive fix for it yet
What version of Bun is running?
1.1.1+ca1dbb4eb
What platform is your computer?
Darwin 23.4.0 arm64 arm
What steps can reproduce the bug?
run
bunx nuxi init myproject
, selectbun
as the package managerWhat is the expected behavior?
it works
What do you see instead?
Additional information
No response