File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed
Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 4848
4949### Fixes
5050
51+ - ** Vercel deployment: Fix ` functions ` pattern validation error**
52+ - The ` functions ` key in ` vercel.json ` referenced ` api/index.js ` — a build artifact created by
53+ ` bundle-api.mjs ` — which does not exist in the source tree. Vercel CLI validates patterns against
54+ source files before the build runs, producing the error:
55+ ` The pattern "api/index.js" defined in "functions" doesn't match any Serverless Functions ` .
56+ - Removed ` functions ` from ` vercel.json ` and moved the memory/maxDuration settings to an inline
57+ ` export const config ` in ` server/index.ts ` . This is the standard Vercel per-function configuration
58+ mechanism and is bundled into ` api/index.js ` by esbuild.
59+
5160- ** Vercel deployment: Fix ` @vercel/node@3 ` runtime error**
5261 - Removed the ` functions.runtime ` config from ` vercel.json ` — the ` runtime ` field is only for custom/community runtimes, not Node.js. Vercel auto-detects the pre-bundled ` api/index.js ` as a Node.js serverless function.
5362
Original file line number Diff line number Diff line change @@ -235,3 +235,15 @@ app.all('*', async (c) => {
235235} ) ;
236236
237237export default handle ( app ) ;
238+
239+ /**
240+ * Vercel per-function configuration.
241+ *
242+ * Picked up by the @vercel/node runtime from the deployed api/index.js bundle.
243+ * Replaces the top-level "functions" key in vercel.json so there is no
244+ * pre-build file-pattern validation against a not-yet-bundled artifact.
245+ */
246+ export const config = {
247+ memory : 1024 ,
248+ maxDuration : 60 ,
249+ } ;
Original file line number Diff line number Diff line change 1010 "VITE_SERVER_URL" : " https://play.objectstack.ai"
1111 }
1212 },
13- "functions" : {
14- "api/index.js" : {
15- "memory" : 1024 ,
16- "maxDuration" : 60
17- }
18- },
1913 "rewrites" : [
2014 { "source" : " /api/(.*)" , "destination" : " /api" },
2115 { "source" : " /((?!api/).*)" , "destination" : " /index.html" }
You can’t perform that action at this time.
0 commit comments