Skip to content

presets(vercel): support node.js 26 - #4968

Merged
pi0 merged 3 commits into
nitrojs:v2from
ali-vercel:fix/vercel-node-26-v2
Nov 1, 2026
Merged

pi0 merged 3 commits into
nitrojs:v2from
ali-vercel:fix/vercel-node-26-v2

Conversation

@ali-vercel

@ali-vercel ali-vercel commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🔗 Linked issue

None filed; context below.

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Summary: Let the vercel preset resolve Node.js 26 as the function runtime, so Node.js 26 builds no longer deploy on nodejs24.x.

Context: Vercel made Node.js 26 generally available on 2026-10-29. New projects default to 26.x, and projects with an open engines.node range such as >=22 now build on Node.js 26. The preset picks the runtime from SUPPORTED_NODE_VERSIONS = [18, 20, 22, 24] and falls back to the last entry when nothing matches. So on a Node.js 26 build, .vc-config.json quietly gets nodejs24.x, with no warning. Nuxt 4 depends on nitropack@^2, so every Nuxt 4 app on Vercel hits this.

The supported list is now [22, 24, 26], matching NODE_VERSIONS in Vercel's build-utils. A build on 21, 23 or 25 uses the next supported version, and a build on a newer major uses nodejs26.x until Vercel adds it. Node.js 18 and 20 are discontinued on Vercel, so older builds map to nodejs22.x. An explicit vercel.functions.runtime still takes precedence, and nodejs24.x and nodejs26.x are added to its type.

Vercel only lists Node.js 22, 24 and 26 today (no public source says newer majors will be added automatically), so the list stays explicit and gets bumped when Vercel adds a version. For comparison, SvelteKit's Vercel adapter accepts any even major since sveltejs/kit#17570; the open-ended sveltejs/kit#17584 is not merged.

The same fix for v3 is #4969.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

🤖 Generated with Claude Code

…(v2)

The preset picked the runtime from a hard-coded list of Node.js versions,
so a build on Node.js 26 silently produced `nodejs24.x` in `.vc-config.json`.
Use `nodejs<major>.x` for any even major from 20, so new Vercel runtimes need
no code change. Odd majors use the previous even one; majors below 20 use
`nodejs20.x`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 30, 2026

Copy link
Copy Markdown

@ali-vercel is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fc796cd6-2565-4ad7-ae8e-5d3d1a330c0c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@ali-vercel ali-vercel mentioned this pull request Oct 30, 2026
2 of 8 tasks
@pi0 pi0 added the v2 label Oct 30, 2026
…6 (v2)

Vercel supports every Node.js major from 26 onwards, not only even ones,
so a Node.js 27 build should deploy on `nodejs27.x`. Older majors keep
using the next supported version, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ali-vercel ali-vercel changed the title fix(vercel): use even Node.js build versions as the function runtime (v2) fix(vercel): use the build's Node.js runtime for every version from 26 (v2) Oct 30, 2026
Matches Vercel's build-utils NODE_VERSIONS. Node.js 20 is discontinued on Vercel, and newer builds clamp to 26 instead of emitting a runtime Vercel does not offer yet.
@pi0x pi0x changed the title fix(vercel): use the build's Node.js runtime for every version from 26 (v2) fix(vercel): support Node.js 26 (v2) Nov 1, 2026
@pi0x

pi0x commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Updated this to match #4969: a fixed list of [22, 24, 26], the same as NODE_VERSIONS in Vercel's build-utils. Node.js 20 is also dropped since Vercel discontinued it, so older builds now use nodejs22.x, and builds newer than 26 use nodejs26.x.

Triaged with AI assistance.

@pkg-pr-new

pkg-pr-new Bot commented Nov 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nitropack@4968

commit: bbfac98

@pi0
pi0 marked this pull request as ready for review November 1, 2026 04:15
@pi0
pi0 self-requested a review as a code owner November 1, 2026 04:15
@pi0 pi0 changed the title fix(vercel): support Node.js 26 (v2) presets(vercel): support node.js 26 Nov 1, 2026
@pi0
pi0 merged commit a676074 into nitrojs:v2 Nov 1, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants