alpha version: quit command hangs/timeouts on Windows 10 PRO
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 devat 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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