cloudflare / cloudflare/vinext
Pages Router: `_next/data` JSON endpoint not implemented
- Dominant language
- TypeScript
- Stars
- 8.8k
- Forks
- 406
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 120
Description
> *This issue was created by an agent analysing CI failures from the [Next.js Deploy Suite](https://github.com/cloudflare/vinext/actions/runs/26163751905) (vinext `main` vs Next.js `v16.2.6`, 2026-05-20).*
## Problem
The Pages Router production server does not handle `/_next/data/[buildId]/[page].json` requests. In Next.js, client-side navigations in the Pages Router fetch page data from this endpoint, which returns a JSON object like `{"pageProps":{"message":"Hello"}}`.
When vinext receives these requests, it either:
1. Returns **404** — does not recognize the `_next/data` URL pattern
2. Returns **HTML** — serves the full rendered page instead of the JSON data envelope
Additionally, middleware URL normalization is missing: middleware sees the raw `/_next/data/.../page.json` path instead of the normalized page path (e.g., `/page`).
```
FetchError: invalid json response body at
http://127.0.0.1:33447/_next/data/e6777d6d-.../es/about.json
reason: Unexpected token '<', "
Contributor guide
Assessment
This issue has not been assessed yet.