Skip to content

Commit 3f8a348

Browse files
Claudehotlong
andauthored
Fix RemoteTransport HttpClient2 bundling error
- Mark @libsql/client as external in bundle-api.mjs - Add @libsql/client to vercel.json includeFiles - Prevents esbuild from bundling @libsql/client which breaks HttpClient2 constructor Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/bba47546-4868-4fbb-94cc-909dd5f6757d Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 32c339e commit 3f8a348

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

apps/studio/scripts/bundle-api.mjs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ import { build } from 'esbuild';
1616

1717
// Packages that cannot be bundled (native bindings / optional drivers)
1818
const EXTERNAL = [
19-
// @libsql/client is now bundled (pure JS, no native bindings)
20-
// Bundling it solves Vercel deployment issues where external packages
21-
// aren't properly included in the serverless function despite includeFiles config
19+
// @libsql/client must be external — bundling breaks internal HttpClient2 class constructor
20+
'@libsql/client',
2221
'better-sqlite3',
2322
// AI SDK provider packages — dynamically imported based on env vars
2423
'@ai-sdk/anthropic',

apps/studio/vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"api/**/*.js": {
1414
"memory": 1024,
1515
"maxDuration": 300,
16-
"includeFiles": "node_modules/{better-sqlite3,@ai-sdk}/**"
16+
"includeFiles": "node_modules/{@libsql/client,better-sqlite3,@ai-sdk}/**"
1717
}
1818
},
1919
"headers": [

0 commit comments

Comments
 (0)