Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…er-sqlite3 prebuilt binaries Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
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.nodeconstraint inpackage.json. - Add
.node-versionto 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. |
| "engines": { | ||
| "node": ">=20.0.0" | ||
| }, |
There was a problem hiding this comment.
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.
Vercel Turbo Build Machines default to Node.js v24.13.0, which has no prebuilt
better-sqlite3binaries. This forces a fullnode-gypC++ 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 to20.xpackage.json— Addengines.node: ">=20.0.0"💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.