Desploy on Vercel faild
sintacs opened this issue · 1 comments
Don't know if its related to you code or vercel.
https://vercel.com/sintacs/design2code/9VuS3vj8S4nmMX6dLfSfrTa3m4MB
[10:16:18.757] Running build in Washington, D.C., USA (East) – iad1 (Hive)
[10:16:18.887] Cloning github.com/sintacs/design2code (Branch: main, Commit: a09aa8b)
[10:16:19.265] Previous build cache not available
[10:16:19.274] Cloning completed: 386.717ms
[10:16:20.168] Running "vercel build"
[10:16:21.125] Vercel CLI 32.5.6
[10:16:21.598] Detected pnpm-lock.yaml
version 6 generated by pnpm 8
[10:16:21.616] Installing dependencies...
[10:16:22.248] Lockfile is up to date, resolution step is skipped
[10:16:22.312] Progress: resolved 1, reused 0, downloaded 0, added 0
[10:16:22.464] Packages: +485
[10:16:22.465] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[10:16:23.315] Progress: resolved 485, reused 0, downloaded 54, added 48
[10:16:24.315] Progress: resolved 485, reused 0, downloaded 164, added 150
[10:16:25.315] Progress: resolved 485, reused 0, downloaded 201, added 186
[10:16:26.316] Progress: resolved 485, reused 0, downloaded 210, added 195
[10:16:27.385] Progress: resolved 485, reused 0, downloaded 211, added 195
[10:16:28.387] Progress: resolved 485, reused 0, downloaded 219, added 205
[10:16:29.387] Progress: resolved 485, reused 0, downloaded 221, added 205
[10:16:30.387] Progress: resolved 485, reused 0, downloaded 226, added 210
[10:16:31.388] Progress: resolved 485, reused 0, downloaded 236, added 220
[10:16:32.388] Progress: resolved 485, reused 0, downloaded 313, added 304
[10:16:33.388] Progress: resolved 485, reused 0, downloaded 439, added 427
[10:16:33.835] Progress: resolved 485, reused 0, downloaded 485, added 485, done
[10:16:34.148]
[10:16:34.148] dependencies:
[10:16:34.148] + @codemirror/commands 6.3.0
[10:16:34.148] + @codemirror/lang-html 6.4.6
[10:16:34.149] + @codemirror/language 6.9.2
[10:16:34.149] + @codemirror/state 6.3.1
[10:16:34.149] + @codemirror/view 6.22.0
[10:16:34.149] + @radix-ui/react-dialog 1.0.5
[10:16:34.150] + @radix-ui/react-dropdown-menu 2.0.6
[10:16:34.150] + @radix-ui/react-icons 1.3.0
[10:16:34.150] + @radix-ui/react-label 2.0.2
[10:16:34.150] + @radix-ui/react-select 2.0.0
[10:16:34.150] + @radix-ui/react-separator 1.0.3
[10:16:34.150] + @radix-ui/react-slot 1.0.2
[10:16:34.150] + @radix-ui/react-switch 1.0.3
[10:16:34.151] + @radix-ui/react-tabs 1.0.4
[10:16:34.151] + @radix-ui/react-toast 1.1.5
[10:16:34.151] + @tailwindcss/typography 0.5.10
[10:16:34.151] + @tanstack/react-query 4.36.1
[10:16:34.151] + ai 2.2.25
[10:16:34.151] + class-variance-authority 0.7.0
[10:16:34.151] + clsx 2.0.0
[10:16:34.152] + codemirror 6.0.1
[10:16:34.152] + lucide-react 0.292.0
[10:16:34.154] + next 14.0.3
[10:16:34.154] + openai 4.19.1
[10:16:34.154] + react 18.2.0
[10:16:34.155] + react-dom 18.2.0
[10:16:34.155] + react-dropzone 14.2.3
[10:16:34.155] + react-hot-toast 2.4.1
[10:16:34.155] + tailwind-merge 1.14.0
[10:16:34.155] + tailwindcss-animate 1.0.7
[10:16:34.155] + thememirror 2.0.1
[10:16:34.155] + zod 3.22.4
[10:16:34.155]
[10:16:34.156] devDependencies:
[10:16:34.156] + @types/node 20.9.3
[10:16:34.156] + @types/react 18.2.38
[10:16:34.156] + @types/react-dom 18.2.16
[10:16:34.156] + autoprefixer 10.4.16
[10:16:34.156] + eslint 8.54.0
[10:16:34.156] + eslint-config-next 14.0.3
[10:16:34.156] + eslint-plugin-react-hooks 4.6.0
[10:16:34.157] + eslint-plugin-react-refresh 0.4.4
[10:16:34.157] + postcss 8.4.31
[10:16:34.157] + tailwindcss 3.3.5
[10:16:34.157] + typescript 5.3.2
[10:16:34.157]
[10:16:34.187] Done in 12.5s
[10:16:34.225] Detected Next.js version: 14.0.3
[10:16:34.234] Running "pnpm run build"
[10:16:34.728]
[10:16:34.729] > design2code@0.1.0 build /vercel/path0
[10:16:34.729] > next build
[10:16:34.729]
[10:16:35.383] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[10:16:35.383] This information is used to shape Next.js' roadmap and prioritize features.
[10:16:35.383] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[10:16:35.383] https://nextjs.org/telemetry
[10:16:35.384]
[10:16:35.482] ▲ Next.js 14.0.3
[10:16:35.483]
[10:16:35.483] Creating an optimized production build ...
[10:16:53.656] ✓ Compiled successfully
[10:16:53.658] Linting and checking validity of types ...
[10:17:01.161] Collecting page data ...
[10:17:02.932] Generating static pages (0/6) ...
[10:17:03.327]
Generating static pages (1/6)
[10:17:03.328]
Generating static pages (2/6)
[10:17:03.471]
Generating static pages (4/6)
[10:17:03.848]
✓ Generating static pages (6/6)
[10:17:04.571] Finalizing page optimization ...
[10:17:04.571] Collecting build traces ...
[10:17:11.681]
[10:17:11.684] Route (app) Size First Load JS
[10:17:11.685] ┌ ○ / 192 kB 291 kB
[10:17:11.685] ├ ○ /_not-found 877 B 84.9 kB
[10:17:11.685] └ λ /api/code 0 B 0 B
[10:17:11.685] + First Load JS shared by all 84 kB
[10:17:11.686] ├ chunks/569-e688b2a5a5b44a39.js 28.7 kB
[10:17:11.686] ├ chunks/c141e8ea-33ec9891726d808a.js 53.3 kB
[10:17:11.686] ├ chunks/main-app-3892d8246b3df54e.js 218 B
[10:17:11.686] └ chunks/webpack-e9138b7faa113438.js 1.78 kB
[10:17:11.686]
[10:17:11.686]
[10:17:11.686] ○ (Static) prerendered as static content
[10:17:11.686] λ (Dynamic) server-rendered on demand using Node.js
[10:17:11.686]
[10:17:11.832] Traced Next.js server files in: 67.182ms
[10:17:14.288] Created all serverless functions in: 2.455s
[10:17:14.296] Collected static files (public/, static/, .next/static): 4.779ms
[10:17:14.510] Build Completed in /vercel/output [53s]
[10:17:14.692] Deploying outputs...
[10:17:17.115] Error: Builder returned invalid maxDuration value for Serverless Function "api/code". Serverless Functions must have a maxDuration between 1 and 10 for plan hobby. : https://vercel.com/docs/concepts/limits/overview#serverless-function-execution-timeout
[10:17:19.802]
@sintacs As you can see in the logs, for the hobby plan, the maxDuration
parameter for Serverless Functions needs to be between 1 and 10 seconds.
Quick fix? Just remove this line of config in the api route export const maxDuration = 180
Keep in mind, with this limitation applied, the code generation api stops after 10 seconds.
if you need longer executions, consider upgrading to the Vercel Pro plan, which doesn't have this limitation.
I will add this as an env variable to change it during deployment as needed.
Additionally, I'd like to suggest exploring the use of Vercel Edge Functions with the openai-edge
package which does not have this limitation. However, it's essential to verify whether the openai-edge
package supports the new vision API, as this API newly released.
Hit me up if you need a hand or want to chat about it! 🚀