vercel/next.js · error
Warning: data for page "${__NEXT_DATA__.page}" (path "${cont
Error message
Warning: data for page "${__NEXT_DATA__.page}" (path "${context.dangerousAsPath}") is ${prettyBytes(bytes)} which exceeds the threshold of ${prettyBytes(largePageDataBytes)}, this amount of data can reduce performance.
See more info here: https://nextjs.org/docs/messages/large-page-data What it means
Error "Warning: data for page "${__NEXT_DATA__.page}" (path "${context.dangerousAsPath}") is ${prettyBytes(bytes)} which exceeds the threshold of ${prettyBytes(largePageDataBytes)}, this amount of data can reduce performance. See more info here: https://nextjs.org/docs/messages/large-page-data" thrown in vercel/next.js.
Source
Thrown at packages/next/src/pages/_document.tsx:880
if (largePageDataWarnings.has(__NEXT_DATA__.page)) {
return htmlEscapeJsonString(data)
}
const bytes =
process.env.NEXT_RUNTIME === 'edge'
? new TextEncoder().encode(data).buffer.byteLength
: Buffer.from(data).byteLength
const prettyBytes = (
require('../lib/pretty-bytes') as typeof import('../lib/pretty-bytes')
).default
if (largePageDataBytes && bytes > largePageDataBytes) {
if (process.env.NODE_ENV === 'production') {
largePageDataWarnings.add(__NEXT_DATA__.page)
}
console.warn(
`Warning: data for page "${__NEXT_DATA__.page}"${
__NEXT_DATA__.page === context.dangerousAsPath
? ''
: ` (path "${context.dangerousAsPath}")`
} is ${prettyBytes(
bytes
)} which exceeds the threshold of ${prettyBytes(
largePageDataBytes
)}, this amount of data can reduce performance.\nSee more info here: https://nextjs.org/docs/messages/large-page-data`
)
}
return htmlEscapeJsonString(data)
} catch (err) {
if (isError(err) && err.message.indexOf('circular structure') !== -1) {
throw new Error(
`Circular structure in "getInitialProps" result of page "${__NEXT_DATA__.page}". https://nextjs.org/docs/messages/circular-structure`
)View on GitHub (pinned to 0eb3775416)
Solutions
- Reduce the page data size (smaller props), or increase `largePageDataBytes` if the size is intentional.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/next/src/pages/_document.tsx:880 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19).
Data as JSON: /api/errors/7127069cbfdf3c19.
Report an issue: GitHub.