Fix @libsql/client native dependency resolution for Vercel deployment#1116
Closed
Fix @libsql/client native dependency resolution for Vercel deployment#1116
Conversation
…ployment - Mark @libsql/client as external in esbuild (cannot bundle native bindings) - Copy entire @libsql scope to include platform-specific binaries - Add @libsql to vercel.json includeFiles pattern Fixes "Cannot find module '@libsql/linux-x64-gnu'" error on Vercel Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/b0b587fe-a979-4361-8899-62cbc1fe5261 Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
Claude created this pull request from a session on behalf of
xuyushun441-sys
April 13, 2026 09:29
View session
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…studio Vercel serverless functions require external packages to be direct dependencies in package.json, not just transitive workspace dependencies. Adding these packages ensures they are properly installed and included in the deployment. Related to: Cannot find package '@libsql/client' imported from /var/task/apps/studio/api/_handler.js Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/4a0e5628-d026-4dab-ad6d-6ad619aeb571 Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
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 deployment was failing with
Cannot find module '@libsql/linux-x64-gnu'because the Turso driver's native binaries were not included in the serverless function package.Root Cause
@libsql/clientwas marked for bundling in esbuild, but it depends on platform-specific native binaries (e.g.,@libsql/linux-x64-gnuon Linux x64) that cannot be bundled. The deployment package lacked these runtime dependencies.Changes
@libsql/clientas external (native bindings cannot be bundled)@libsql/*scope to ensure all platform-specific binaries are included@libsqltoincludeFilespattern for serverless function packagingThis follows the same pattern already used for
better-sqlite3and@ai-sdkpackages.