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(teammanch-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
- Attached custom apex domain
ciellecandles.app(registrar GoDaddy / Third Party DNS; A record at76.76.21.21). - Vercel issued the Let’s Encrypt cert for that domain.
- No env-var changes. No
vercel.json. No project setting changes via CLI or dashboard.
Local repro / workaround
vercel pull --yes --environment productionthenvercel build --prodsucceeds locally (CLI 50.35.0).vercel deploy --prebuilt --prodships to production cleanly with the same source.- Conclusion: the regression is in the remote builder’s
modifyConfigstep. The locally-built.vercel/outputis 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.