Next.js 16.2.6 remote build fails

Title

Next.js 16.2.6 remote build fails with TypeError: path argument must be of type string. Received undefined during Applying modifyConfig from Vercel

Body

Summary

A production build that shipped successfully at 2026-05-22 16:07 UTC began failing on Vercel’s remote builder ~24 minutes later. Build cache cleared (--force) and a vercel redeploy of the previously-successful deployment ID both reproduce the failure. Local vercel build succeeds, and vercel deploy --prebuilt --prod ships fine, so the regression is on the remote builder, not in the project.

Project

  • Project: cielle-formula-app (team manch-kersees-projects)
  • Framework: Next.js 16.2.6
  • Node version: 24.x
  • Vercel CLI on builder: 54.3.0
  • Local Vercel CLI: 50.35.0

Deployment IDs

State Deployment Time (UTC) Duration
Last successful remote build dpl_9SrDPPViRR2i4Z8pYU1FnaT7Ukfu 2026-05-22T16:07:11 56s
Auto-deploy from git (cached) cielle-formula-ffkwa5say 2026-05-22T16:31:49 6s — fails
Force-rebuild, no cache cielle-formula-asx7uy92z 2026-05-22T16:34:46 24s — fails
vercel redeploy of the good URL cielle-formula-mfhqoqcxb ~2026-05-22T16:37 23s — fails
Prebuilt workaround dpl_7rr2G37sKcF7A9YEQXaqDC7yK5pQ 2026-05-22T~16:42 READY
All three failing deployments produce identical log output.

Build log (failing — all three)

Detected Next.js version: 16.2.6
Running "npm run build"
> cielle-candles@0.1.0 build
> next build
Applying modifyConfig from Vercel
> Build error occurred
TypeError: The "path" argument must be of type string. Received undefined
at ignore-listed frames {
  code: 'ERR_INVALID_ARG_TYPE'
}
Error: Command "npm run build" exited with 1

Build log (successful — same project, 24 min earlier)

Detected Next.js version: 16.2.6
Running "npm run build"
> cielle-candles@0.1.0 build
> next build
Applying modifyConfig from Vercel
▲ Next.js 16.2.6 (Turbopack)

i.e. in the good build, ▲ Next.js 16.2.6 (Turbopack) appears 137ms after Applying modifyConfig from Vercel. In the failing builds, the next event is the TypeError — Next.js never starts.

Project changes between good and failing builds

  1. Attached custom apex domain ciellecandles.app (registrar GoDaddy / Third Party DNS; A record at 76.76.21.21).
  2. Vercel issued the Let’s Encrypt cert for that domain.
  3. No env-var changes. No vercel.json. No project setting changes via CLI or dashboard.

Local repro / workaround

  • vercel pull --yes --environment production then vercel build --prod succeeds locally (CLI 50.35.0).
  • vercel deploy --prebuilt --prod ships to production cleanly with the same source.
  • Conclusion: the regression is in the remote builder’s modifyConfig step. The locally-built .vercel/output is fine.

Suspicion

Applying modifyConfig from Vercel is where the platform patches next.config with platform-level settings (redirects, headers, image domains, etc.). A path argument going undefined here suggests something in the project state is being read as undefined and passed to a Node path API. The only material project change between the good and failing builds was a third-party-DNS apex domain attachment + cert issuance — worth checking whether that produces a project state shape (alias list? edge config? image config? assetPrefix?) that the patcher doesn’t handle.
If anyone needs more detail (full unredacted logs, project config dump), happy to provide.

Same error, different stack, can confirm this is happening on our project too.

Project: coordinator (team_vGTARzIqepot5z7oHepmJ8qL, project prj_yry9y58eDTvmbfcbluQ45IDptpGH) Framework: Next.js 16.2.6 Vercel builder version 54.3.0 (same as yours)

Identical TypeError on Applying modifyConfig from Vercel. Started ~14:00 UTC today. Empty commits reproduce the failure. Local npm run build and vercel build --prod both succeed.

Our stack differs from yours (no custom domain change today, no Sentry+PWA+BundleAnalyzer wrapper). So the trigger may not be specific to the domain attachment you flagged — likely a deeper regression in modifyConfig.

Last successful deploy: 2498a6d / dpl_CFFcupRHsj6DqqCGJSirrREiDfLS at 2026-05-22 13:51 UTC.

Will try the vercel deploy --prebuilt --prod workaround you mentioned.