Skip to content

fix(local): Cap engines.node at 24 so Vercel stops building on Node 26 - #1933

Merged
betegon merged 1 commit into
mainfrom
fix/local-pin-node-engines
Nov 4, 2026
Merged

betegon merged 1 commit into
mainfrom
fix/local-pin-node-engines

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

The sentry-local Vercel deploy (root apps/local) fails during pnpm install on main and on PRs. The last green main deploy was 47cc01a3 (2026-11-03 23:26 UTC). The first red one is c969e135, and no repo change between them touches engines, the lockfile, or Vercel config.

Cause. apps/local/package.json declares "node": "^20.19.0 || >=22.12.0". When engines.node is set, Vercel ignores the project's Node setting (24.x). Its newer builder (CLI 65.11.0, compared with 65.4.0 on the last green build) now resolves >=22.12.0 to Node 26:

Warning: Due to "engines": { "node": "^20.19.0 || >=22.12.0" } in your `package.json` file, the Node.js Version defined in your Project Settings ("24.x") will not apply, Node.js Version "26.x" will be used instead.

On Node 26.13.0, better-sqlite3@11.10.0 (from @sentry/mcp-cloudflare) has no prebuild. The fallback compile from source then fails against the Node 26 V8 headers:

prebuild-install warn install No prebuilt binaries found (target=26.13.0 runtime=node arch=x64 libc= platform=linux)
./src/objects/statement.lzz:322:81: error: 'const class v8::PropertyCallbackInfo<v8::Value>' has no member named 'This'
Error: Command "pnpm install --force --frozen-lockfile" exited with 1

Fix. Cap the range at ^24.0.0. Vercel then keeps the project's 24.x setting, and Node 20, 22, and 24 still satisfy the range. A semver check gives 20.19.0, 22.12.0, and 24.11.0 as satisfying it, and 26.13.0 as not.

Not in this PR. The root package.json still has >=22.13. Vercel reads apps/local/package.json because of the project's root directory, so the root range doesn't affect this deploy. The longer-term fix is to bump better-sqlite3 to a release with Node 26 prebuilds, and then lift the cap.

Verification. The Vercel preview on this PR is the real check. I did not run the full local quality gate for this one-line engines change.

via bete.

--

View Session [Sentry]

Vercel ignores the project's Node 24.x setting when engines.node is an
open-ended range, and now resolves '>=22.12.0' to Node 26. better-sqlite3
11.10.0 has no Node 26 prebuild and fails to compile against its headers,
so every sentry-local preview fails during pnpm install.

Co-Authored-By: Miguel Betegon <miguel.betegon@sentry.io>
@vercel

vercel Bot commented Nov 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sentry-local Ready Ready Preview Nov 4, 2026 9:42am UTC

Request Review

@github-actions github-actions Bot added the risk: low PR risk score: low label Nov 4, 2026
@betegon
betegon merged commit 3469810 into main Nov 4, 2026
28 checks passed
@betegon
betegon deleted the fix/local-pin-node-engines branch November 4, 2026 09:54
BYK added a commit that referenced this pull request Nov 4, 2026
## Summary

Removes `better-sqlite3`, which is what breaks `pnpm install` on Node
26: v11.10.0 has no Node 26 prebuild and fails to compile from source.
Then reverts the `apps/local` `engines.node` cap from #1933, since that
cap only worked around this dependency.

### Why it's safe to drop

- It was declared only in `packages/mcp-cloudflare` (left over from the
early eval scaffolding). No source, config, script, or workflow in the
repo imports or references it.
- mcp-cloudflare runs on Workers. The CLI uses built-in `node:sqlite`
(or `node-sqlite3-wasm` on older Node), not better-sqlite3.
- I searched every installed package for references. Nothing in the
Workers toolchain mcp-cloudflare uses (wrangler, miniflare, workerd,
`@cloudflare/*` plugins, `agents`, `workers-mcp`, vite, vitest) mentions
it. The only hit was `unstorage`, which lists `better-sqlite3@^12` as a
devDependency, reached through cli-docs/astro.
- The lockfile diff is removals only: better-sqlite3 and the transitive
deps only it used (`prebuild-install`, `bindings`, `tar-fs`, …).

### #1933 revert

`apps/local/package.json` is back to `^20.19.0 || >=22.12.0`. With
better-sqlite3 gone, Node 26 installs cleanly. Locally on Node 26.13.0,
Vercel's install command (`pnpm install --force --frozen-lockfile`) and
the `apps/local` build both succeed. This PR's `sentry-local` Vercel
preview should confirm the same.

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A83888ac5c03ff2a0c30fb6a303f1b836 -->

--

[View Session in
Sentry](https://sentry.sentry.io/explore/conversations/agent%3A83888ac5c03ff2a0c30fb6a303f1b836/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <126780+BYK@users.noreply.github.com>

This branch was successfully deployed

1 active deployment
Preview — 278a391c Deployed Nov 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant