vercel/next.js · error · Error
Config options `experimental.proxyPrefetch` and…
Error message
Config options `experimental.proxyPrefetch` and `experimental.middlewarePrefetch` cannot be set at the same time. Please use `experimental.proxyPrefetch` instead.
What it means
Config validation in assignDefaultsAndValidate: both experimental.proxyClientMaxBodySize and its renamed legacy alias experimental.middlewareClientMaxBodySize are set at once. Because one option was renamed to the other, setting both is ambiguous; the guard throws and instructs the user to keep only proxyClientMaxBodySize.
Solutions
- Remove experimental.middlewarePrefetch and keep only experimental.proxyPrefetch.
Defensive patterns
Strategy: validation
When it happens
Trigger: Both proxyPrefetch and middlewarePrefetch are set.
Common situations: Config defines both the deprecated middlewarePrefetch and the new proxyPrefetch.
AI-assisted analysis of vercel/next.js@34433fd12e (2026-08-19).
Data as JSON: /api/errors/fb480ec5b1e2efe9.
Report an issue: GitHub.
Appendix: source
Thrown at packages/next/src/server/config.ts:1054
'Server Actions Size Limit must be a valid number or filesize format larger than 1MB: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit'
)
}
}
// Throw if both Middleware and Proxy config are set.
if (
userConfig.experimental?.proxyClientMaxBodySize !== undefined &&
userConfig.experimental?.middlewareClientMaxBodySize !== undefined
) {
throw new Error(
'Config options `experimental.proxyClientMaxBodySize` and `experimental.middlewareClientMaxBodySize` cannot be set at the same time. Please use `experimental.proxyClientMaxBodySize` instead.'
)
}
if (
userConfig.experimental?.proxyPrefetch !== undefined &&
userConfig.experimental?.middlewarePrefetch !== undefined
) {
throw new Error(
'Config options `experimental.proxyPrefetch` and `experimental.middlewarePrefetch` cannot be set at the same time. Please use `experimental.proxyPrefetch` instead.'
)
}
if (
userConfig.experimental?.externalProxyRewritesResolve !== undefined &&
userConfig.experimental?.externalMiddlewareRewritesResolve !== undefined
) {
throw new Error(
'Config options `experimental.externalProxyRewritesResolve` and `experimental.externalMiddlewareRewritesResolve` cannot be set at the same time. Please use `experimental.externalProxyRewritesResolve` instead.'
)
}
if (
userConfig.skipProxyUrlNormalize !== undefined &&
userConfig.skipMiddlewareUrlNormalize !== undefined
) {
throw new Error(
'Config options `skipProxyUrlNormalize` and `skipMiddlewareUrlNormalize` cannot be set at the same time. Please use `skipProxyUrlNormalize` instead.'
)View on GitHub (pinned to 34433fd12e)