Link to the code that reproduces this issue
https://github.com/ari-party/repro-next-data-empty-object
To Reproduce
- Clone this repo
- npm install
- npm run build
- npm start
- Go to http://localhost:3000
- Open DevTools
- Go to the network tab
- Notice each additional
_next/data request for each link to a page
- Open any of the requests
- View the response tab
- Empty JSON response
{}
Current vs. Expected behavior
Current: Requests made to _next/data/*/*.json
Expected: No requests made to _next/data/*/*.json
These empty data files bring no value and may cause a client error if the app is rebuilt, even if assetPrefix with hash is used.
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #35~22.04.1-Ubuntu SMP Mon May 26 18:08:30 UTC 2025
Available memory (MB): 7944
Available CPU cores: 2
Binaries:
Node: 24.11.1
npm: 11.6.2
Yarn: 1.22.22
pnpm: 10.23.0
Relevant Packages:
next: 16.1.6 // Latest available version is detected (16.1.6).
eslint-config-next: 13.5.6
react: 18.2.0
react-dom: 18.2.0
typescript: 5.3.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Middleware, Pages Router
Which stage(s) are affected? (Select all that apply)
next start (local)
Additional context
This a recreation of an older issue #59295.
This issue is present for both the deprecated middleware and the newer proxy.
Additionally might be related: #59612
Link to the code that reproduces this issue
https://github.com/ari-party/repro-next-data-empty-object
To Reproduce
_next/datarequest for each link to a page{}Current vs. Expected behavior
Current: Requests made to
_next/data/*/*.jsonExpected: No requests made to
_next/data/*/*.jsonThese empty data files bring no value and may cause a client error if the app is rebuilt, even if assetPrefix with hash is used.
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #35~22.04.1-Ubuntu SMP Mon May 26 18:08:30 UTC 2025 Available memory (MB): 7944 Available CPU cores: 2 Binaries: Node: 24.11.1 npm: 11.6.2 Yarn: 1.22.22 pnpm: 10.23.0 Relevant Packages: next: 16.1.6 // Latest available version is detected (16.1.6). eslint-config-next: 13.5.6 react: 18.2.0 react-dom: 18.2.0 typescript: 5.3.3 Next.js Config: output: N/AWhich area(s) are affected? (Select all that apply)
Middleware, Pages Router
Which stage(s) are affected? (Select all that apply)
next start (local)
Additional context
This a recreation of an older issue #59295.
This issue is present for both the deprecated middleware and the newer proxy.
Additionally might be related: #59612