Skip to content

[Bug]: write ECONNABORTED during nuxt dev on Windows with Nuxt 4 (hmr, network) #968

Description

@shehab267

labels: 'bug, devtools, windows, hmr, network'

Environment

  • Operating System: Windows_NT
  • Node Version: v22.15.0
  • Nuxt Version: 4.0.0
  • CLI Version: 3.26.2
  • Nitro Version: 2.12.0
  • Package Manager: pnpm@10.13.1
  • Builder: -
  • User Config: compatibilityDate, devtools, components, runtimeConfig, modules, css, postcss, shadcn, tiptap, i18n
  • Runtime Modules: @pinia/nuxt@0.11.2, @nuxtjs/i18n@9.5.6, @nuxtjs/tailwindcss@7.0.0-beta.0, shadcn-nuxt@2.2.0, @nuxt/icon@1.15.0, @nuxt/image@1.10.0, @formkit/auto-animate/nuxt@0.8.2, nuxt-tiptap-editor@2.3.1
  • Build Modules: -

Reproduction

npx nuxi@latest init my-app
select pnpm
init git
cd my-app
pnpm dev
Open http://localhost:3000/, refresh the web page quickly or press ctrl + R continuously.

Same for this issue: #247 (comment)

Describe the bug

  • This issue began immediately after upgrading my project from Nuxt 3 to Nuxt 4.
  • I have already performed the standard troubleshooting steps including:
    • Deleting node_modules, pnpm-lock.yaml, .nuxt/, and .output/ directories.
    • Running pnpm install to reinstall all dependencies.
    • Clearing pnpm cache (pnpm store prune then pnpm cache clean --force).
    • Temporarily disabling my antivirus software and Windows Firewall to rule out network interference.
    • Restarting my development environment and entire machine.
  • The write ECONNABORTED error typically points to a network connection abortion, which seems to occur within the Node.js/Nuxt dev server process, possibly related to HMR or socket communication on Windows.
  • This behavior appears to be similar to other reported issues, particularly nuxt/cli#247, which also discusses ECONNABORTED/ECONNRESET errors on Windows during development.

Additional context

Here is

Image

Logs

pnpm run dev
 in pwsh at 11:41:48
> nuxt-app@ dev C:\work-files\mazaady\rivals_frontend
> nuxt dev
Nuxt 4.0.0 with Nitro 2.12.0 nuxi 11:44:48 AM
11:44:49 AM
➜ Local: http://localhost:3000/
➜ Network: use --host to expose
i Tiptap Editor initialized 11:44:52 AM
➜ DevTools: press Shift + Alt + D in the browser (v2.6.2) 11:44:52 AM
i Nuxt Icon server bundle mode is set to local 11:44:54 AM
√ Nuxt Icon discovered local-installed 1 collections: heroicons 11:45:00 AM
i Re-optimizing dependencies because lockfile has changed 11:45:03 AM
√ Vite client built in 128ms 11:45:03 AM
√ Vite server built in 282ms 11:45:03 AM
√ Nuxt Nitro server built in 2857ms nitro 11:45:07 AM
i Vite client warmed up in 3ms 11:45:07 AM
i Vite server warmed up in 109ms 11:45:07 AM
WARN [Vue Router warn]: No match found for location with path "/auth/login" 11:48:18 AM
i ✨ new dependencies optimized: @intlify/shared 11:48:21 AM
i ✨ new dependencies optimized: @intlify/core-base, vue-toast-notification 11:48:22 AM
i ✨ optimized dependencies changed. reloading 11:48:22 AM
WARN [Vue Router warn]: No match found for location with path "/auth/login" 11:48:22 AM
ERROR [unhandledRejection] write ECONNABORTED 11:48:22 AM
at afterWriteDispatched (node:internal/stream_base_commons:159:15)
at writeGeneric (node:internal/stream_base_commons:150:3)
at Socket._writeGeneric (node:net:971:11)
at Socket._write (node:net:983:8)
at writeOrBuffer (node:internal/streams/writable:572:12)
at _write (node:internal/streams/writable:501:10)
at Writable.write (node:internal/streams/writable:510:10)
at Socket.ondata (node:internal/streams/readable:1009:22)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:561:12)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions