nuxt / nuxt/cli

alpha version: quit command hangs/timeouts on Windows 10 PRO

Open
#1,531 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
399
Forks
119
Avg merge
20h 59m
Merged PRs (30d)
65

Description

Can be tested with the playground here (node v24.19.0):

  • nr dev at root (one terminal)
  • pnpm nuxt dev (in another terminal)
  • open / and navigate to /ws, then click ping button
  • on playground terminal press q: the process awaits the default timeout (15s) and then logs:
[nitro-runtime] close: 0.054ms
◐  Cleaning up... press Ctrl-C again to exit immediately..
 WARN  force closing dev worker...                                                                                                                                                

◒  Cleaning up... press Ctrl-C again to exit immediately...function                                                                                                                 
│
▲  The dev server did not shut down within 15s: 80 file watchers, 1 worker thread, 1 open connection, 2 timers. Exiting anyway.
◇  Canceled                                                                           

I added a hack to show the opened connections adding the following code before calling summariseActiveResources at setupSignalHandlers in dev.ts:

        const handles = (process as any)._getActiveHandles?.()
        const networkHandles = handles.filter(h => (
          h.constructor.name === 'Socket'
          || h.constructor.name === 'Server'
        ))
        console.dir(networkHandles, { depth: 2 })
        const summary = summariseActiveResources()

Moving this.#websocketConnections.add(socket) before the if statement to allow #closeWebSocketConnections to close also these connections, the 1 open connection dissapear.

I'm working on fixing file watchers...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Windows 10 failure using the playground commands and websocket interaction described in the issue. Read packages/nuxt-cli/src/commands/dev.ts around setupSignalHandlers and packages/nuxt-cli/src/dev/utils.ts around websocket connection cleanup, then investigate the remaining file-watcher resources. Done means quitting no longer waits for the 15-second timeout or exits with active resources reported.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.