Skip to content

Pin Node.js 20.x LTS for Vercel builds to avoid better-sqlite3 native compilation#239

Merged
hotlong merged 2 commits intomainfrom
copilot/improve-objectos-implementation-again
Feb 11, 2026
Merged

Pin Node.js 20.x LTS for Vercel builds to avoid better-sqlite3 native compilation#239
hotlong merged 2 commits intomainfrom
copilot/improve-objectos-implementation-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 11, 2026

Vercel Turbo Build Machines default to Node.js v24.13.0, which has no prebuilt better-sqlite3 binaries. This forces a full node-gyp C++ compilation from source (~50s), slowing builds and risking timeouts.

Node.js 20.x LTS has prebuilt binaries available, eliminating the native compilation step entirely.

  • .node-version — Pin Vercel to 20.x
  • package.json — Add engines.node: ">=20.0.0"

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 11, 2026

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

Project Deployment Actions Updated (UTC)
objectos Ready Ready Preview, Comment Feb 11, 2026 2:23am
objectos-demo Error Error Feb 11, 2026 2:23am

Request Review

…er-sqlite3 prebuilt binaries

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve implementation of ObjectOS Pin Node.js 20.x LTS for Vercel builds to avoid better-sqlite3 native compilation Feb 11, 2026
Copilot AI requested a review from hotlong February 11, 2026 02:17
@hotlong hotlong marked this pull request as ready for review February 11, 2026 02:37
Copilot AI review requested due to automatic review settings February 11, 2026 02:37
@hotlong hotlong merged commit fe5493d into main Feb 11, 2026
4 of 5 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins the Node.js runtime used during Vercel builds to avoid better-sqlite3 falling back to slow node-gyp compilation under Node 24+, improving build reliability and speed for the ObjectOS monorepo.

Changes:

  • Add a root engines.node constraint in package.json.
  • Add .node-version to request Node 20.x on platforms that honor it (e.g., Vercel).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
package.json Declares supported Node range via engines.node.
.node-version Pins Node to 20.x for build environments that read this file.

Comment thread package.json
Comment on lines +6 to +8
"engines": {
"node": ">=20.0.0"
},
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

engines.node is set to ">=20.0.0", which still allows Node 24+ on platforms that use engines for version selection (including Vercel in some configurations). If the goal is to avoid better-sqlite3 source builds by pinning Node 20, consider using "20.x" (or a bounded range like ">=20 <21") so the setting actually enforces the intended major version.

Copilot uses AI. Check for mistakes.
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.

3 participants