Next.js 15 deployment missing page chunk, causing hydration fail

Subject: Next.js 15 page chunk missing on Vercel CDN after deployment
Deployments: dpl_CSdgdTfeCbitJMnds1Kmtsfc8PDB / dpl_9umNPFK1ACwJfkFd8XKAg5LQto8s
Project: elng12s-projects/pinpointanswertoday-app (prj_eA95HPEQyAQziU9z332oryeZfbx8, org team_hnCrUmUSKchB9tq5FoISBfAa)


Summary

Our production deployment is missing the page chunk for:

/_next/static/chunks/app/[locale]/puzzles/[puzzleSlug]/page-*.js

The HTML references this chunk, but the file is not present on Vercel CDN and consistently returns 404.
This causes client hydration to fail and the page to stay stuck in a loading skeleton state.

Both prebuilt and regular deployments reproduce the issue.


Details

1. Missing chunk referenced in HTML

Example HTML snippet (deployment dpl_CSdgdTfeCbitJMnds1Kmtsfc8PDB, URL:
https://pinpointanswertoday.app/en/puzzles/pinpoint-answer-571):

<script src="/_next/static/chunks/app/%5Blocale%5D/puzzles/%5BpuzzleSlug%5D/page-7d8dd043543c4d7e.js?dpl=dpl_CSdgdTfeCbitJMnds1Kmtsfc8PDB" async></script>

The referenced file always results in 404.

2. CDN Requests return 404

curl -I -L https://pinpointanswertoday.app/_next/static/chunks/app/%5Blocale%5D/puzzles/%5BpuzzleSlug%5D/page-7d8dd043543c4d7e.js?dpl=dpl_CSdgdTfeCbitJMnds1Kmtsfc8PDB

HTTP/2 308
location: /_next/static/chunks/app/%5blocale%5d/puzzles/%5bpuzzleslug%5d/page-7d8dd043543c4d7e.js?dpl=...

HTTP/2 404
x-matched-path: /_next/static/not-found.txt
x-vercel-cache: HIT

Same behavior occurs on the deployment alias domain.

3. Local build output does contain the chunk

Local build environment:

  • Next.js 15.5.6
  • Node 20 (also reproduced with Node 22 on Vercel cloud)
  • Build command:
    SKIP_DB=1 USE_STATIC_PUZZLES=1 npm run build

Local artifacts:

  • .next/static/chunks/app/[locale]/puzzles/[puzzleSlug]/page-77c02b7120ba3c03.js exists.
  • After vercel build --prebuilt:
    .vercel/output/static/_next/static/chunks/app/[locale]/puzzles/[puzzleSlug]/page-77c02b7120ba3c03.js also exists.
  • A custom validator script (scripts/check-app-chunks.ts) confirms all 210/210 expected app chunks are present locally.

The missing hash (7d8dd043…) corresponds to the correct route in other deployments as well—none of these valid chunks ever appear on the Vercel CDN.

4. Deployment paths attempted

Both deployment methods produce the same issue:

  1. Prebuilt upload
    vercel buildvercel deploy --prebuilt --prod
    Deployment ID: dpl_9umNPFK1ACwJfkFd8XKAg5LQto8s
  2. Regular deploy (Vercel builds in cloud)
    vercel deploy --prod
    Deployment ID: dpl_CSdgdTfeCbitJMnds1Kmtsfc8PDB

Both result in the chunk missing.


Impact

Hydration fails for all puzzle pages:

  • SSR HTML loads
  • but the associated page chunk 404s
  • React never hydrates → user only sees skeleton UI
  • A client-side auto-reload fallback gets stuck in a loop because the chunk remains unavailable

This is currently blocking production users.


Request

Could you help investigate why:

_next/static/chunks/app/[locale]/puzzles/[puzzleSlug]/page-*.js

is not uploaded or not served in these deployments?

More specifically:

  • Is the Build Output API discarding this path?
  • Is this related to app directory + dynamic segments + force-dynamic?
  • Is there any workaround we can apply on our side (config, route options, build flags, etc.)?

I can provide:

  • full .vercel/output bundle
  • output from scripts/check-app-chunks.ts
  • full curl logs
  • package.json and next.config.mjs
  • or any other debugging info you need.

Thanks!

There’s another community post with 404 debugging tips that might be helpful. Please give these solutions a try and let us know how it goes.

A human should be around soon to offer more advice. But you can also get helpful information quickly by asking v0.

Hi,

Have you enabled https://vercel.com/docs/skew-protection in your project? It should retain the old deployment hash for stale client for certain period (based on your settings)

Thanks for pointing out Skew Protection. We double-checked the docs and it does help keep stale clients pinned to the previous deployment, but only when the platform can serve the old assets in the first place. In our case the chunk /_next/static/chunks/app/[locale]/puzzles/[puzzleSlug]/page-7d8dd043543c4d7e.js was never uploaded to the CDN for either deployment (dpl_9umNPFK1ACwJfkFd8XKAg5LQto8s or dpl_CSdgdTfeCbitJMnds1Kmtsfc8PDB), so there’s no “old” file for Skew Protection to fall back to. The docs also note that Skew Protection doesn’t apply when deploying with vercel deploy --prebuilt, because the deployment ID isn’t known at build time, so even if it were enabled it wouldn’t cover our prebuilt runs [1].

So the core issue is still the missing chunk on Vercel’s side. Once that’s resolved we can absolutely turn on Skew Protection (and avoid --prebuilt) to minimize future skew, but it can’t fix a chunk that never existed on the CDN.

Your application should never serve a JS that was never uploaded. Do you have a repro?

You are correct. If you deploy a prebuilt build, it will not have Skew protection.

git:GitHub - elng12/vercel-support

We need a repro that can be deployed to Vercel. Unfortunately, above doesn’t look like a valid Next.js app.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.