nuxt/cli

`bun --bun run dev` exits silently from 3.7.0

Closed this issue ยท 4 comments

Since the introduction of the internal dev server being forked as a child process bun --bun run dev and bunx --bun nuxt dev will exit silently with a zero code.

This happens because child_process.fork() is only partially implemented in Bun. Specifically Bun does not do IPC on child processes yet.

This is an issue in Bun and not Nuxi.

oven-sh/bun#4468 The good news is that IPC is being worked on heavily here and looks like it will be released soon.

that pr will fix things, so long as you don't do anything too wacky with the stdio option. (cant pass more than 3 params to that array).

pi0 commented

I will be working on a non-forked mode of dev command to unblock this in meantime. BTW if you try nuxi _dev, there will be other issues we should investigate for bun:

 WARN  nuxi _dev is an internal command and should not be used directly. Please use nuxi dev instead.                                           nuxi 1:04:34 PM

โœ” Listening on http://127.0.0.1:64057/                                                                                                         nuxi 1:04:34 PM
โ„น Dev server event: type="nuxt:internal:dev:loading" message="Starting nuxt..."                                                                nuxi 1:04:34 PM
  โžœ WSS:      ws://localhost:8080/ws                                                                                                                 1:04:34 PM

โœ” Nitro built in 286 ms                                                                                                                       nitro 1:04:36 PM
โ„น Dev server event: type="nuxt:internal:dev:ready" port=64057                                                                                  nuxi 1:04:36 PM
โ„น Vite client warmed up in 868ms                                                                                                                    1:04:36 PM

 ERROR  [h3] [unhandled] Unable to connect. Is the computer able to access the url?                                                                  1:04:40 PM

  at new H3Error (node_modules/.pnpm/h3@1.8.1/node_modules/h3/dist/index.mjs:45:4)
  at createError (node_modules/.pnpm/h3@1.8.1/node_modules/h3/dist/index.mjs:78:26)
  at <anonymous> (node_modules/.pnpm/h3@1.8.1/node_modules/h3/dist/index.mjs:1842:25)
  at processTicksAndRejections (:1:1302)
pi0 commented

forked disabling done #153, #154

dev server issue by unjs/nitro#1702