Skip to content

Page reload causes stream/headers errors and crashes on clean Nuxt install  #1081

@Gwynerva

Description

@Gwynerva

Environment

Windows 11
Node 24 and 22
npm or bun
Nuxt 4 (reproduced on 4.0.0, 4.1.0 and 4.1.3)

Reproduction

Create a clean fresh empty Nuxt 4 project.
Run Nuxt in dev mode npm/bun dev, disable caching in browser options (not requried but helps to reproduce more reliably), start spamming page refresh command (Ctrl + R) and you will see errors in terminal.

Describe the bug

In dev mode (and only in dev) when refreshing the page Nuxt sometimes log stream errors:

Image Image

I would just ignore them, but sometimes they crash the Nuxt entirely, triggering full restart (not just server but whole Nuxt):

nuxt-stream-bug.mp4

Additional context

Would not say it is critical, but indeed it is annoying and happens even without fast refreshing.
It also errors only in dev mode. In build or generate mode I did not manage to reproduce it no matter how fast I spam page refresh.

Also it seems I started to notice it only yersterday and fell like everything was alright before... Maybe have not noticed or did not payed attention earlier...

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