Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Adding proxy causes requests to _next/data which return empty data | GoodFirstPicks

Adding proxy causes requests to _next/data which return empty data

vercel/next.js 0 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeNext.jsTypeScriptReact

Why this is a good first issue

Proxy configuration causes unnecessary empty data requests in Next.js.

AI Summary

The issue involves proxy configuration in Next.js causing unnecessary empty data requests to `_next/data`. A potential solution exists via a pnpm patch, but it's unclear if this affects other parts of the system or if it's the correct architectural approach. The problem is reproducible but involves middleware which is deprecated.

Issue Description

Link to the code that reproduces this issue

https://github.com/ari-party/repro-next-data-empty-object

To Reproduce

  1. Clone this repo
  2. npm install
  3. npm run build
  4. npm start
  5. Go to http://localhost:3000
  6. Open DevTools
  7. Go to the network tab
  8. Notice each additional _next/data request for each link to a page
  9. Open any of the requests
  10. View the response tab
  11. 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 https://github.com/vercel/next.js/issues/59295. This issue is present for both the deprecated middleware and the newer proxy.

Additionally might be related: https://github.com/vercel/next.js/issues/59612

GitHub Labels

MiddlewarePages Router

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!

Risk Flags

  • potential cross-cutting changes
  • related to deprecated middleware
Loading labels...

Details

Points20 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno