Skip to content

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

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

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

Conversation

@ali-vercel

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

Copy link
Copy Markdown
Contributor

🔗 Linked issue

None filed; context below. Happy to open an issue first if you'd prefer to discuss it there.

❓ 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, instead of falling back to 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 only knows [22, 24], so a Node.js 26 build quietly deploys nodejs24.x. With engines.node: "26.x" it warns that only 22 and 24 are supported, then deploys nodejs24.x anyway.

The supported list is now [22, 24, 26], matching NODE_VERSIONS in Vercel's build-utils. A build on 23 or 25 uses the next supported version, and a build on a newer major uses nodejs26.x until Vercel adds it. Node.js 20 stays out, as #4768 intended. An explicit vercel.functions.runtime still takes precedence, and nodejs26.x is 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 v2 fix for Nuxt 4 is #4968.

📝 Checklist

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

🤖 Generated with Claude Code

The preset hard-coded Node.js 22 and 24, so a Node 26 build (or
`engines.node: 26.x`) deployed on nodejs24.x. Derive the supported
versions from the even majors from 22 up to the newest known one or the
build's own major, so future even versions need no change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ali-vercel ali-vercel mentioned this pull request Oct 30, 2026
1 of 8 tasks
@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

Review in Change Stack →

Caution

Review failed

The pull request is closed.

  • 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

@pi0 pi0 added enhancement New feature or request preset:vercel labels Oct 30, 2026
Vercel supports every Node.js major from 26 onwards, not only even ones,
so a Node.js 27 build or `engines.node: 27.x` should deploy on
`nodejs27.x`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ali-vercel ali-vercel changed the title fix(vercel): support Node.js 26 and newer even versions fix(vercel): support Node.js 26 and every newer version Oct 30, 2026
Vercel lists each supported major explicitly (build-utils NODE_VERSIONS). Newer builds clamp to 26 instead of emitting a runtime Vercel does not offer yet.
@pi0x pi0x changed the title fix(vercel): support Node.js 26 and every newer version fix(vercel): support Node.js 26 Nov 1, 2026
@pi0x

pi0x commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

I changed this to a fixed list of [22, 24, 26], the same as NODE_VERSIONS in Vercel's build-utils. A build on a newer major now uses nodejs26.x instead of writing a runtime Vercel does not offer yet, and we can add new versions when Vercel lists them.

Triaged with AI assistance.

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

Labels

enhancement New feature or request preset:vercel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants