#85374·Next.js

Next.js >=16.0.0: Mismatch in RSC file paths causes 404 errors in static exports on Windows

Author: aaakulCreated Oct 26, 2025Updated Sep 28, 2026
LabelsOutputLinking and Navigating

Link to the code that reproduces this issue

https://github.com/Aaakul/next16-next-link-rsc-issue

To Reproduce

  1. Clone the reproduction repository
  2. Run cd next16
  3. Run npm install
  4. Run npm run build (output: 'export' is already set in next.config.ts)
  5. Run npx serve out
  6. Visit /next16 in a browser (e.g., http://localhost:3000/next16), open developer tools and check the console for 404 errors. Click the link to navigate to /next16/page, refresh and check if similar errors appears.
  7. Run cd ..
  8. Run cd next15
  9. Repeat 3~6

Current vs. Expected behavior

Current Behavior (Next.js 16.0.0 ~ 16.3.5 + output: 'export'):

When visiting static exported page has next/link with default prefetching or is explicitly set to true / "auto" / null, the page attempts to fetch the target page's RSC Payload from incorrect path, resulting in a 404 Not Found error (e.g., '.../page/__next.page.PAGE.txt?_rsc=...'). Image

Expected Behavior (Next.js 15.5.6 + output: 'export'):

Invalid RSC requests are not expected in statically exported pages

Provide environment information

bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Home
  Available memory (MB): 32578
  Available CPU cores: 16
Binaries:
  Node: 20.19.5
  npm: 10.8.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.0.1
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: export

Which area(s) are affected? (Select all that apply)

Linking and Navigating, Output

Which stage(s) are affected? (Select all that apply)

next build (local), Other (Deployed)

Additional context

According to Axiorema's blog and this Next.js pull request, the problem comes from a big change in Next.js 16. This change affects how React Server Component (RSC) data is loaded. Even if you don’t use the new "Cache Components" feature, it still changes the way RSC data is handled.

The main issue is a mismatch between the file paths created during the build process and the file paths the browser looks for:

  • During the build, the file might be saved in a folder like __next/page/__PAGE__.txt.
  • But the browser tries to find the file with a name like __next.page.__PAGE__.txt.

Workaround

To fix this, you can use a build adapter, which is explained in Axiorema's blog: The Workaround: A Build Adapter.