Skip to content

fix: upgrade @hono/node-server to fix Node.js v24 crash#1605

Open
fede-kamel wants to merge 1 commit intoPortkey-AI:mainfrom
fede-kamel:fix/node24-hono-compat
Open

fix: upgrade @hono/node-server to fix Node.js v24 crash#1605
fede-kamel wants to merge 1 commit intoPortkey-AI:mainfrom
fede-kamel:fix/node24-hono-compat

Conversation

@fede-kamel
Copy link
Copy Markdown

Closes #1604

Summary

  • Bump @hono/node-server from ^1.3.3 (resolved 1.13.5) to ^1.14.2 (resolved 1.19.14)
  • Fixes Failed to find Response internal state key error on Node.js v24
  • One-line change in package.json + lockfile update

Root Cause

Node.js v24 ships a newer version of Undici that changed how Response internal state is accessed (nodejs/undici@45dceeaf). This was fixed upstream in honojs/node-server#241 and released in @hono/node-server@1.14.2.

Before (Node v24)

Failed to find Response internal state key
Failed to start the app: 1

After (Node v24)

🚀 Your AI Gateway is running at:
   http://localhost:8787

✨ Ready for connections!

Test Plan

  • npm run build — clean
  • node start-test.js — boots without error, exits 0
  • Unit tests — no regressions (same 6 pre-existing failures in handlers/services/)

@fede-kamel
Copy link
Copy Markdown
Author

@VisargD @narengogi Verified the fix on Node.js v24.10.0:

Build + server boot:

✅ npm run build — clean (2.8s)
✅ node start-test.js — boots without "Failed to find Response internal state key", exits 0

Unit tests (29/29 pass):

Test Suites: 6 failed, 1 passed, 7 total
Tests:       29 passed, 29 total

The 6 suite failures are pre-existing on main (missing ../hooksService module import) — not related to this change.

TypeScript: same 2 pre-existing errors on main (bytez/api.ts, open-ai-base/index.ts) — not related.

Before (Node v24 + @hono/node-server@1.13.5):

Failed to find Response internal state key
Failed to start the app: 1

After (Node v24 + @hono/node-server@1.19.14):

🚀 Your AI Gateway is running at: http://localhost:8787
✨ Ready for connections!
EXIT: 0

This is a one-line version bump — minimal risk, high impact for anyone developing on Node v24.

@fede-kamel
Copy link
Copy Markdown
Author

Friendly ping — this PR has been open for ~10 days without a review. Happy to address feedback or rebase further if needed. Let me know if there's anything I can clarify. Thanks!

narengogi
narengogi previously approved these changes Apr 29, 2026
@narengogi
Copy link
Copy Markdown
Member

@fede-kamel please sign your commits

Bump @hono/node-server from ^1.3.3 (resolved 1.13.5) to ^1.14.2
(resolved 1.19.14) to fix "Failed to find Response internal state key"
error on Node.js v24.

Root cause: Node v24 ships a newer Undici that changed how Response
internal state is accessed. Fixed upstream in honojs/node-server#241,
released in @hono/node-server@1.14.2.

Closes Portkey-AI#1604
@fede-kamel fede-kamel force-pushed the fix/node24-hono-compat branch from 0417093 to 8079ef7 Compare April 29, 2026 23:49
@fede-kamel
Copy link
Copy Markdown
Author

Hi @narengogi — thanks for the review!

Force-pushed 8079ef73:

  • Signed the commit (now showing as Verified ✅).
  • Also fixed what was actually causing Check Prettier Formatting to fail: my local package-lock.json had baked in an internal mirror URL on the new @hono/node-server entry, which the GitHub runner couldn't reach. Now points at registry.npmjs.org (same integrity hash, same package).

The workflow run is currently sitting in action_required state — could you approve it when you have a moment? Thanks!

@fede-kamel fede-kamel requested a review from narengogi May 1, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Node.js v24 crash — 'Failed to find Response internal state key'

2 participants