Hi Vercel Team,
I’m on the Hobby plan and deploying a Next.js 15 project using pnpm and Prisma with Supabase as the backend.
Problem:
next build
completes successfully- Static pages and serverless functions are generated
- Deployment ends with:
An unexpected error happened when running this build. We have been notified of the problem.
Build Details:
Framework: Next.js 15.4.4
Package manager: pnpm
Database: Prisma + Supabase
Node.js version: 22.x (also tried 20.x)
Postinstall: prisma generate (works fine)
Relevant Logs:
[08:08:38.720] Route (app) ... ✓ Generating static pages (31/31)
[08:08:39.405] Created all serverless functions
[08:08:39.684] Build Completed in /vercel/output
[08:08:39.803] Deploying outputs...
[08:08:46.023] An unexpected error happened when running this build.
What I’ve tried:
Locked Node version to 20.x in package.json
Verified local production build works (pnpm build && pnpm start)
Confirmed environment variables are correctly set for Supabase and Prisma
It seems like a deployment-stage issue since the Next.js build completes without errors.
Can you please help check what could be causing the unexpected error during final deployment?
Thank you!