Repository navigation
presets(vercel): add support for node@24 (v2) - #4628
Merged
Merged
Conversation
Backport of nitrojs#3967 for the v2 branch. Vercel has supported nodejs24.x for builds and functions since it went GA, and it is now the default for new projects. Without 24 in the list, a build container running Node 24 matches no entry and falls through to `.at(-1)`, so the emitted .vc-config.json pins the function to nodejs22.x while the build installed Node 24 artifacts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
@ps-20x is attempting to deploy a commit to the Nitro Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
pi0
approved these changes
Sep 14, 2026
commit: |
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.
🔗 Linked issue
#3965
❓ Type of change
📚 Description
Backport of #3967 for
v2.#3967 landed on
main(v3) in January and was never backported, sov2still caps the Vercel runtime atnodejs22.x. Sincenuxt@4depends onnitropack@^2, every Nuxt app on Vercel is affected, and the only stable release line that has the fix is v3 beta.Why this is more than a cosmetic label. When the build container runs Node 24,
SUPPORTED_NODE_VERSIONS.find((v) => v >= 24)matches nothing and falls through to?? SUPPORTED_NODE_VERSIONS.at(-1), so.vc-config.jsongetsnodejs22.x. The build and the function then disagree about the Node version, which is silent until something in the bundle is ABI-sensitive.We hit this in production on a Nuxt 4 site. Setting
engines.node: "^24"made Vercel build on Node 24, which installed the ABI-137 prebuild ofisolated-vm(a transitive native dep of@builder.io/sdk-vue), while nitro pinned the lambda tonodejs22.x:Every SSR and ISR route 500'd, since the ISR functions symlink to
__fallback.funcand inherit its config. The Vercel project's Node.js Version setting was already 24.x and had no effect — for Build Output API deployments the runtime comes from.vc-config.json.nodejs24.xis the identifier Vercel itself uses; from@vercel/build-utils'NODE_VERSIONStable:Verified against
nitropack@2.13.4with a realNITRO_PRESET=vercelbuild:__fallback.func/.vc-config.jsongoes from"runtime": "nodejs22.x"to"runtime": "nodejs24.x"on Node 24, and is unchanged on Node 22.Kept deliberately minimal and identical in shape to #3967 —
18is left in place, and theruntime?:union intypes.tsstill omitsnodejs24.xon both branches, so I left that alone rather than diverge frommain. Happy to fold either in if you'd prefer.📝 Checklist
docs/2.deploy/20.providers/vercel.mdonv2does not enumerate supported Node versions.