Fix Vercel deployment: pin Node 20.x, build all packages, fix TS2742 errors#263
Merged
Fix Vercel deployment: pin Node 20.x, build all packages, fix TS2742 errors#263
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…errors - Pin engines.node to "20.x" (matches .node-version) to ensure Vercel uses Node 20 LTS with prebuilt better-sqlite3 binaries instead of Node 24 - Update build:vercel to build all packages except site (API function needs workspace packages compiled to dist/) - Sync pnpm-workspace.yaml onlyBuiltDependencies with package.json - Fix TS2742 declaration emit errors in @objectos/permissions by adding explicit ServiceObject type annotations - Remove unused ACCESS_LEVELS constant Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix deployment failure on Vercel for server and web
Fix Vercel deployment: pin Node 20.x, build all packages, fix TS2742 errors
Feb 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Vercel deployment failures caused by Node version incompatibility and incomplete build configurations. The deployment was failing because Vercel selected Node 24.13.0 (no prebuilt better-sqlite3 binaries available) and the build script wasn't compiling all required workspace packages.
Changes:
- Pin Node runtime to
20.xto ensure prebuilt native binaries are available - Update
build:vercelfilter to build all packages except@objectos/site(API serverless functions require compiled workspace packages) - Add explicit
ServiceObjecttype annotations to fix TS2742 declaration emit errors in@objectos/permissions
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| package.json | Pin Node engine to 20.x and update Vercel build filter to exclude only site package |
| pnpm-workspace.yaml | Add better-sqlite3 to onlyBuiltDependencies list |
| packages/permissions/src/objects/*.ts | Add ServiceObject type annotations to exported objects to fix TypeScript declaration errors |
| packages/permissions/src/objects/organization_default.ts | Remove unused ACCESS_LEVELS constant |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vercel deploy fails during
pnpm install—better-sqlite3has no prebuilt binaries for Node 24.13.0 (which Vercel selects givenengines.node: ">=20.0.0"), triggering a native compilation that fails. Additionally,build:vercelonly built@objectos/web, leaving workspace packages uncompiled for the API serverless function.Node runtime
engines.nodeto"20.x"(matches existing.node-version), ensuring prebuiltbetter-sqlite3binaries are availableBuild scope
build:vercelfrom--filter=@objectos/web...to--filter='!@objectos/site'— the API function atapi/index.tsimportsobjectstack.config.tswhich transitively requires all@objectos/*packages to havedist/builtTS2742 declaration errors in
@objectos/permissionsObjectSchema.create()returns a type referencing internal@objectstack/specchunk files, causing declaration emit failuresServiceObjecttype annotations on all 7 exported object constants:Housekeeping
pnpm-workspace.yamlonlyBuiltDependencieswithpackage.json(addbetter-sqlite3)ACCESS_LEVELSconstant inorganization_default.ts✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.