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. |
|
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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 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 |
🔗 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.