Skip to content

Add Node.js >= 20 engine constraint for Fastify v5#501

Open
shrinishLT wants to merge 1 commit intoLambdaTest:stagefrom
shrinishLT:TE-12603
Open

Add Node.js >= 20 engine constraint for Fastify v5#501
shrinishLT wants to merge 1 commit intoLambdaTest:stagefrom
shrinishLT:TE-12603

Conversation

@shrinishLT
Copy link
Copy Markdown
Contributor

Summary

  • Adds "engines": { "node": ">=20" } to package.json to enforce the Node.js minimum version required by Fastify v5
  • Bumps version to 4.1.64

Root Cause

PR #498 upgraded Fastify from v4 to v5 to fix CVE-2026-25223. Fastify v5 uses diagnostics_channel.tracingChannel() — an API only available in Node.js >= 20. Users on older Node versions hit a TypeError crash at startup:

TypeError: diagnostics.tracingChannel is not a function
    at fastify/lib/wrap-thenable.js:10

Without an engines field, npm install gives no warning, and the error at runtime is cryptic and hard to diagnose.

Fix

Adds an engines constraint so users get a clear error at install time instead of a runtime crash.

Test plan

  • Verify npm install warns on Node.js < 20
  • Verify CLI starts successfully on Node.js >= 20
  • Run e2e tests on Node.js 20+

🤖 Generated with Claude Code

Fastify v5 uses diagnostics_channel.tracingChannel() which only exists
in Node.js >= 20. Without an engines constraint, users on older Node
versions hit a cryptic TypeError at startup. This gives a clear error
at install time instead.

Fixes: TE-12603

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant