vercel/next.js · error
A page's revalidate option must be seconds expressed as a na
Error message
A page's revalidate option must be seconds expressed as a natural number. Mixed numbers and strings cannot be used. Received '${JSON.stringify(data.revalidate)}' for ${req.url} What it means
Error "A page's revalidate option must be seconds expressed as a natural number. Mixed numbers and strings cannot be used. Received '${JSON.stringify(data.revalidate)}' for ${req.url}" thrown in vercel/next.js.
Source
Thrown at packages/next/src/server/render.tsx:1032
`\nTo only run getStaticProps at build-time and not revalidate at runtime, you can set \`revalidate\` to \`false\`!`
)
}
revalidate = data.revalidate
}
} else if (data.revalidate === true) {
// When enabled, revalidate after 1 second. This value is optimal for
// the most up-to-date page possible, but without a 1-to-1
// request-refresh ratio.
revalidate = 1
} else if (
data.revalidate === false ||
typeof data.revalidate === 'undefined'
) {
// By default, we never revalidate.
revalidate = false
} else {
throw new Error(
`A page's revalidate option must be seconds expressed as a natural number. Mixed numbers and strings cannot be used. Received '${JSON.stringify(
data.revalidate
)}' for ${req.url}`
)
}
} else {
// By default, we never revalidate.
revalidate = false
}
props.pageProps = Object.assign(
{},
props.pageProps,
'props' in data ? data.props : undefined
)
// pass up cache control and props for export
metadata.cacheControl = { revalidate, expire: undefined }View on GitHub (pinned to 89d017eac4)
Solutions
- Return `revalidate` as a single number (seconds) or `false`, e.g. `return { props: {}, revalidate: 60 }`.
- Do not mix numbers and strings or use expressions that produce non-integer values.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/next/src/server/render.tsx:1034 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/next.js@89d017eac4 (2026-08-19).
Data as JSON: /api/errors/f1cce20331f1583c.
Report an issue: GitHub.