From b9c3d5ec4cdf136504e4df1d086d86bb95659a6a Mon Sep 17 00:00:00 2001 From: ohm Date: Wed, 5 Aug 2026 11:19:39 +0700 Subject: [PATCH] fix(deploy): opt out of standalone output on Vercel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `output: "standalone"` exists for the Docker image, which copies `.next/standalone` and runs `node server.js`. Vercel produces its own output and does not expect standalone, which is the leading suspect for the deploy failure — the Vercel project has never had a successful deployment, while GitHub Actions runs the identical install and build on Linux and passes. Gated on the `VERCEL` build env var so the Docker path is untouched. Verified both ways locally: `VERCEL=1 next build` emits no `.next/standalone`, and a plain `next build` still emits `.next/standalone/server.js`. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01BaSzXHiVdswD9rKoVh9Ln4 --- next.config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/next.config.ts b/next.config.ts index 7d8d4d0..6ea7e78 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,10 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - output: "standalone", + // `standalone` exists for the Docker image, which copies `.next/standalone` + // and runs `node server.js`. Vercel builds its own output and does not want + // it, so opt out there via the `VERCEL` build env var. + output: process.env.VERCEL ? undefined : "standalone", reactStrictMode: true, typedRoutes: true, // Pin the workspace root so it can never be inferred outside this repo.