Skip to content

writeEarlyHints never resolves with node runtime #1383

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions