Deploying outputs fails with internal error — zero output artifacts

Update — found the actual root cause with a local vercel build run, since
the dashboard gives no diagnostic detail at all. I want to be upfront that I
can’t be 100% certain this is a Vercel-side issue, but I’ve run out of
angles to test on my end. Cross-posting from a parallel thread I have going
with Amy (Vercel team) on r/vercel:
Reddit - Please wait for verification — flagging here too in case
this forum gets more visibility with your infra team.

The real error (never surfaces in the dashboard)

Running npx vercel build locally exposes the actual internal failure:

Error: Unable to find lambda for route: /dashboard/perfil
code: “NEXT_MISSING_LAMBDA”

Full stack trace from .vercel/output/builds.json:

at …/node_modules/@vercel/next/dist/index.js:12940:13
at …/node_modules/@vercel/next/dist/index.js:15614:18
at Array.map ()
at serverBuild (…/node_modules/@vercel/next/dist/index.js:15613:49)

Next.js itself compiles and traces this route without any error — the
.nft.json file exists and is valid, and the build output correctly shows:

├ ○ /dashboard/perfil (Static)
├ ƒ /dashboard/[id] (Dynamic)

The failure happens strictly inside @vercel/next’s lambda-grouping step,
after Next.js has already finished successfully. .vercel/output/functions/
is never created — the process dies before writing a single output
artifact. This matches the “empty Builds record / zero artifacts” pattern I
flagged in my original post above.

100% reproducible locally

Ran the identical build 3 times with zero code changes: same error, same
route, every time.

I fixed it — and the error moved to a completely unrelated route

Theory at the time: a static leaf (/dashboard/perfil, ○) next to a
dynamic sibling (/dashboard/[id], ƒ) under the same path was confusing
the lambda grouping. Added a scoped app/(admin)/dashboard/layout.tsx with
export const dynamic = "force-dynamic" to force the whole subtree dynamic.

Result: /dashboard/perfil correctly flipped ○ → ƒ. Next.js compiled
clean. Build still failed — same error code, now on a structurally
unrelated route:

Error: Unable to find lambda for route: /menu/[localId]
code: “NEXT_MISSING_LAMBDA”

This route has zero static siblings in conflict. It’s a standalone SSG
route:

export const revalidate = false;
export const dynamicParams = true;
generateStaticParams() → returns (params resolved from a database at
request time, standard on-demand ISR pattern)

This is inconsistent with my original theory — fixing the reported
occurrence relocated the failure instead of resolving it.

Cross-checked against Next.js 15.5.20

To rule out a Next 16-specific cause, I downgraded to next@15.5.20 (latest
stable 15.x) with zero code changes and re-ran the build. Identical
failure, same route, same internal error code. Same builder, same result
across two major Next.js versions — points away from a Next-version-specific
cause and toward @vercel/next itself. Reverted back to 16.1.6 afterward.

Everything else already ruled out (see original post above for full list)

Middleware, vercel.json, stale deps, route naming collisions, --prebuilt,
the build-queue incident (confirmed resolved, retried, same failure),
project-level config (reproduced identically on a brand-new isolated
project with zero Git integration). A structurally similar production
branch deploys clean in under 2 minutes against that same new project,
ruling out account/CLI as the cause too.

Same pattern reported by others, unresolved

Several independently report the affected route changing between build
attempts — consistent with what I saw after my fix relocated it.

I could be missing something on my end, but I’ve genuinely run out of
things to test locally. Happy to share the full builds.json output or the
exact commit hash that fails 100% of the time. Repo is private (real client
data), but glad to share any specific file/config on request.