-
Couldn't load subscription status.
- Fork 29.7k
Open
Labels
Linking and NavigatingRelated to Next.js linking (e.g., <Link>) and navigation.Related to Next.js linking (e.g., <Link>) and navigation.OutputRelated to the the output configuration option.Related to the the output configuration option.
Description
Link to the code that reproduces this issue
https://github.com/Aaakul/next16-next-link-rsc-issue
To Reproduce
- Clone the reproduction repository
- Run
cd next16 - Run
npm install - Run
npm run build(output: 'export' is already set in next.config.ts) - Run
npx serve out - Visit
/next16in 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. - Run
cd .. - Run
cd next15 - Repeat 3~6
Current vs. Expected behavior
Current Behavior (Next.js 16.0.0/16.0.1-canary.2 + 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=...').
Expected Behavior (Next.js 15.5.6 + output: 'export'):
Invalid RSC requests are not expected in statically exported pages
Provide environment information
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-canary.2
eslint-config-next: N/A
react: 19.2.0
react-dom: 19.2.0
typescript: 5.9.3
Next.js Config:
output: exportWhich 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
- Reproducible Versions: Next.js 16.0.0 and 16.0.1-canary.2.
- This issue does not exist in Next.js 15.5.6
- This issue is reproducible locally using npx serve out and is also observed on static hosting platforms like GitHub Pages: https://aaakul.github.io/next16/ and Cloudflare Pages
Comparing my demo's output .txt files:
- Next 15.5.6:
index.txtpage.txt - Next 16.0.1-canary.2:
│ index.txt
│ page.txt
│ _not-found.txt
│ __next._full.txt
│ __next._index.txt
│ __next._tree.txt
│ __next.__PAGE__.txt
│
|─page
│ │ __next.page.txt
│ │ __next._full.txt
│ │ __next._index.txt
│ │ __next._tree.txt
│ │
│ └─__next.page
│ __PAGE__.txt
│
└─_not-found
│ __next._full.txt
│ __next._index.txt
│ __next._not-found.txt
│ __next._tree.txt
└─__next._not-found
__PAGE__.txt
Metadata
Metadata
Assignees
Labels
Linking and NavigatingRelated to Next.js linking (e.g., <Link>) and navigation.Related to Next.js linking (e.g., <Link>) and navigation.OutputRelated to the the output configuration option.Related to the the output configuration option.