Skip to content

writeEarlyHints never resolves with node runtime #1383

@pajecawav

Description

@pajecawav

Environment

h3 2.0.1-rc.22
node v24.15.0

Reproduction

// server.mjs
import { H3, serve, writeEarlyHints } from "h3/node";

const app = new H3().get("/", async event => {
	await writeEarlyHints(event, {});
	return "⚡️ Tadaa!";
});

serve(app, { port: 3000 });

Or clone repo from here https://github.com/pajecawav/h3-early-hints-bug and run pnpm install && node server.mjs

Describe the bug

When using writeEarlyHints with Node runtime promise never resolves so the request handler hangs indefinitely

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions