Add Node.js >= 20 engine constraint for Fastify v5#501
Open
shrinishLT wants to merge 1 commit intoLambdaTest:stagefrom
Open
Add Node.js >= 20 engine constraint for Fastify v5#501shrinishLT wants to merge 1 commit intoLambdaTest:stagefrom
shrinishLT wants to merge 1 commit intoLambdaTest:stagefrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"engines": { "node": ">=20" }topackage.jsonto enforce the Node.js minimum version required by Fastify v54.1.64Root 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 aTypeErrorcrash at startup:Without an
enginesfield,npm installgives no warning, and the error at runtime is cryptic and hard to diagnose.Fix
Adds an
enginesconstraint so users get a clear error at install time instead of a runtime crash.Test plan
npm installwarns on Node.js < 20🤖 Generated with Claude Code