Skip to content

Fix Vercel builds: Node.js 24 and a lighter plugin list - #455

Merged
ericzakariasson merged 2 commits into
mainfrom
cursor/build-on-node-24
Oct 15, 2026
Merged

ericzakariasson merged 2 commits into
mainfrom
cursor/build-on-node-24

Conversation

@ericzakariasson

@ericzakariasson ericzakariasson commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Every Vercel deployment since September has failed, including the #434 merge on main, so production is still on the June 9 build. This fixes the two causes. The preview deploy for this PR is the first successful build since June.

  • Node.js 20 is discontinued on Vercel. The cursor-directory project is still set to 20.x, so builds stopped seconds after cloning. Setting engines.node to 24.x in apps/cursor/package.json (the project's root directory) overrides the project setting, so the change doesn't need Vercel admin access.
  • The homepage's cache fill timed out while prerendering (USE_CACHE_TIMEOUT). The homepage, the plugin pages' static params, and the sitemap all loaded every active plugin with select('*, plugin_components(*)'). That's about 69 MB over 53 requests, because the production Data API returns at most 100 rows per request. The new getPluginListing selects only the plugin columns those three use (about 3 MB) and adds id as a sort tiebreaker so pages can't skip or repeat rows. It replaces getPlugins, which had no other callers.

Production's 100-row cap also truncates the existing fetchAllPages callers that use the default 1,000-row page size (getCompanies, getRuleRedirectSlugs). That's left for a follow-up because fixing it changes what the build prerenders.

Testing

  • Vercel preview: Ready. Collecting page data took 16 s (107 s before), all 5,398 static pages generated in 89 s, and the build completed in 3 minutes.
  • Query timing against the production Data API:
    • Old query: about 111 s and 69 MB for all pages.
    • New query: 3 MB, and 18 s from a laptop over one connection.
    • The install-velocity RPC takes 95 ms, so it wasn't the cause.
  • Checks: bunx biome ci . and bun run typecheck pass.

Vercel discontinued Node.js 20, which the cursor-directory project is
still set to, so every deployment since September has failed right after
cloning. engines.node in the app's package.json overrides the project
setting.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cursor-directory Ready Ready Preview Oct 15, 2026 12:18am UTC

Request Review

The homepage, plugin static params and sitemap all loaded every active
plugin with select('*, plugin_components(*)'): about 69 MB over 53
requests, since the production Data API returns at most 100 rows per
request. That took longer than the cache-fill limit while prerendering
the homepage, so builds failed with USE_CACHE_TIMEOUT.

getPluginListing selects only the plugin columns those three use (about
3 MB) and orders by id as a tiebreaker so pages can't skip or repeat
rows.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ericzakariasson ericzakariasson changed the title Build on Node.js 24 Fix Vercel builds: Node.js 24 and a lighter plugin list Oct 15, 2026
@ericzakariasson
ericzakariasson merged commit 1a17c98 into main Oct 15, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview – cursor-directory — 5f3648be Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant