Vercel deployment failure with internal error during deploying outputs phase

We are investigating this.

For anyone who have switched to Node.js middleware in Next.js and still facing issue. Can you confirm if you have nodeMiddleware flag enabled? Middleware now supports Node.js - Vercel

Status Update

Update - We have rolled out a first mitigation for elevated Build errors. Builds that use Middleware are now excluding the Dubai region (dxb1) from their deployment targets as a temporary measure, and should complete successfully again. We are now working on a mitigation for Builds that are using Edge Functions.
Mar 02, 2026 - 13:00 UTC

Problem

My deployment is still failing despite the status update. The build completes successfully, but it fails during the “Deploying outputs” phase.

Build Log

21:26:33.967 Running build in Washington, D.C., USA (East) – iad1  
21:26:33.967 Build machine configuration: 2 cores, 8 GB  
21:26:33.978 Cloning GitHub - mohithkaranth/tonehouse-ai-coach (Branch: main, Commit: 76724fb)  
21:26:33.978 Skipping build cache, deployment was triggered without cache.  
21:26:34.629 Cloning completed: 651.000ms  
21:26:36.504 Running “vercel build”  
21:26:37.282 Vercel CLI 50.23.2  
21:26:37.626 Installing dependencies…  
21:26:56.722  
21:26:56.723 added 585 packages in 19s  
21:26:56.723  
21:26:56.723 249 packages are looking for funding  
21:26:56.723 run `npm fund` for details  
21:26:56.799 Detected Next.js version: 16.1.4  
21:26:56.805 Running “npm run build”  
21:26:56.904  
21:26:56.905 > tonehouse-ai-coach@0.1.0 build  
21:26:56.905 > prisma generate && next build  
21:26:56.905  
21:26:57.873 Loaded Prisma config from prisma.config.ts.  
21:26:57.873  
21:26:57.996 Prisma schema loaded from prisma/schema.prisma.  
21:26:58.127  
21:26:58.129 ![:check_mark:](https://emoji.discourse-cdn.com/unicode/check_mark.png?v=15 ":check_mark:") Generated Prisma Client (v7.3.0) to ./node_modules/@prisma/client in 61ms  
21:26:58.129  
21:26:58.129 Start by importing your Prisma Client (See: https://pris.ly/d/importing-client )  
21:26:58.130  
21:26:58.130  
21:26:58.921 Attention: Next.js now collects completely anonymous telemetry regarding usage.  
21:26:58.922 This information is used to shape Next.js’ roadmap and prioritize features.  
21:26:58.922 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:  
21:26:58.922 https://nextjs.org/telemetry  
21:26:58.922  
21:26:58.933 ▲ Next.js 16.1.4 (Turbopack)  
21:26:58.934  
21:26:58.945 ![:warning:](https://emoji.discourse-cdn.com/unicode/warning.png?v=15 ":warning:") The “middleware” file convention is deprecated. Please use “proxy” instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy  
21:26:58.973 Creating an optimized production build …  
21:27:11.421 ✓ Compiled successfully in 11.9s  
21:27:11.430 Running TypeScript …  
21:27:16.591 Collecting page data using 1 worker …  
21:27:17.149 Generating static pages using 1 worker (0/23) …  
21:27:17.325 Generating static pages using 1 worker (5/23)  
21:27:17.459 Generating static pages using 1 worker (11/23)  
21:27:17.521 Generating static pages using 1 worker (17/23)  
21:27:17.526 ✓ Generating static pages using 1 worker (23/23) in 376.2ms  
21:27:17.534 Finalizing page optimization …  
21:27:17.538  
21:27:17.542 Route (app)  
21:27:17.542 ┌ ƒ /  
21:27:17.542 ├ ○ /_not-found  
21:27:17.542 ├ ○ /about  
21:27:17.542 ├ ƒ /api/auth/[…nextauth]  
21:27:17.542 ├ ƒ /api/coach  
21:27:17.542 ├ ƒ /api/debug-lessons  
21:27:17.542 ├ ƒ /api/me  
21:27:17.542 ├ ƒ /api/sheet  
21:27:17.542 ├ ƒ /api/youtube-search  
21:27:17.542 ├ ○ /backing-tracks  
21:27:17.542 ├ ○ /coach  
21:27:17.542 ├ ○ /contact  
21:27:17.543 ├ ○ /ear-training  
21:27:17.543 ├ ○ /finder  
21:27:17.543 ├ ○ /lessons  
21:27:17.543 ├ ƒ /lessons/[lessonId]  
21:27:17.543 ├ ○ /lessons/guitar  
21:27:17.543 ├ ○ /metronome  
21:27:17.543 ├ ○ /privacy  
21:27:17.543 ├ ○ /progressions  
21:27:17.543 ├ ○ /robots.txt  
21:27:17.543 ├ ○ /signin  
21:27:17.543 ├ ○ /sitemap.xml  
21:27:17.543 ├ ○ /start  
21:27:17.543 └ ○ /tuner  
21:27:17.543  
21:27:17.543  
21:27:17.543 ƒ Proxy (Middleware)  
21:27:17.544  
21:27:17.544 ○ (Static) prerendered as static content  
21:27:17.544 ƒ (Dynamic) server-rendered on demand  
21:27:17.544  
21:27:18.299 Traced Next.js server files in: 59.538ms  
21:27:18.552 Created all serverless functions in: 252.871ms  
21:27:18.635 Collected static files (public/, static/, .next/static): 4.154ms  
21:27:18.849 Build Completed in /vercel/output [41s]  
21:27:19.168 Deploying outputs…  
21:27:42.293 Error: We encountered an internal error. Please try again.

I get this error when deploying:

Error: We encountered an internal error. Please try again.

You mean this?

import type { NextRequest } from “next/server”;

export function middleware(request: NextRequest) {
// Your middleware logic here
}

export const config = {
runtime: “nodejs”, // Specify the runtime environment as Node.js
};

I changed middleware.ts to proxy.ts and everything works fine after 4 failed builds.

I am in brazil and im having the same problem with my next.js application.. this is the shape of my midleware.ts import type { NextRequest } from “next/server”;

import { NextResponse } from “next/server”;

const COOKIE_KEY = …….

const LOGIN_PATH =……

const STUDENT_DASHBOARD =…..

function isPrivateRoute(path: string): boolean {

return (

*path*.startsWith("/dashboard/estudante") ||

*path*.startsWith("/dashboard/admin")

);

}

export function middleware(request: NextRequest) {

const token = request.cookies.get(COOKIE_KEY);

const currentPath = request.nextUrl.pathname;

if (!token?.value && isPrivateRoute(currentPath)) {

const url = new URL(\`${LOGIN_PATH}?callback=${currentPath}\`, *request*.url);

return NextResponse.redirect(url);

}

if (token?.value && currentPath === LOGIN_PATH) {

return NextResponse.redirect(new URL(STUDENT_DASHBOARD, *request*.url));

}

return NextResponse.next();

}

export const config = {

matcher: [

*// Página pública (login)*

"/",



*// Rotas do student (área privada)*

"/dash…",

*// Rotas do admin (área privada)*

"/dashb…",

],

};

same problem is this related to the politics situation and current event or what :slight_smile:

Same issue

Try modifying middleware.ts to proxy.ts and it will work :slight_smile:

Won’t this break my project? Will it continue to function as expected?


Switching to Node.js middleware fixed it for me.

any ideas when it will be fixed?

Running build in Washington, D.C., USA (East) – iad1

Traced Next.js server files in: 94.658ms
Created all serverless functions in: 700.549ms
Collected static files (public/, static/, .next/static): 73.428ms
Build Completed in /vercel/output [4m]
Deploying outputs...
Error: We encountered an internal error. Please try again.

same issue there :

Function Region

iad1

ƒ Proxy (Middleware)

○  (Static)   prerendered as static content

ƒ  (Dynamic)  server-rendered on demand

Traced Next.js server files in: 54.455ms

Created all serverless functions in: 1.187s

Collected static files (public/, static/, .next/static): 13.147ms

Build Completed in /vercel/output [2m]

Deploying outputs...

Error: We encountered an internal error. Please try again.

Same error here in São Paulo - BR region… Local build is all fine…

Still broken after changing middleware.ts to proxy.ts.

Running build in Washington, D.C., USA (East) – iad1

Traced Next.js server files in: 86.723ms
Created all serverless functions in: 113.409ms
Collected static files (public/, static/, .next/static): 9.057ms
Build Completed in /vercel/output [58s]
Deploying outputs...
Error: We encountered an internal error. Please try again.

Facing same issue since morning with region iad1

19:49:09.153 
Traced Next.js server files in: 49.168ms
19:49:09.461 
Created all serverless functions in: 306.335ms
19:49:09.580 
Collected static files (public/, static/, .next/static): 6.49ms
19:49:10.046 
Build Completed in /vercel/output [1m]
19:49:10.440 
Deploying outputs...
19:49:33.693 
Error: We encountered an internal error. Please try again.

Facing the same issue
Function Region: **iad1

Note: I am already using proxy not middleware

Traced Next.js server files in: 164.055ms

Created all serverless functions in: 829.732ms

Collected static files (public/, static/, .next/static): 14.495ms

Build Completed in /vercel/output [2m]

Deploying outputs...

Error: We encountered an internal error. Please try again.

Hi @mattnewnham-6535, welcome to the Vercel Community!

The reason for builds breaking isn’t the filename but the infrastructure to support Middleware functions.

Our team is working on a fix and update here once we have rolled out fixes.

same problem here