vercel/next.js · error
Config options `skipProxyUrlNormalize` and `skipMiddlewareUr
Error message
Config options `skipProxyUrlNormalize` and `skipMiddlewareUrlNormalize` cannot be set at the same time. Please use `skipProxyUrlNormalize` instead.
What it means
Top-level `skipMiddlewareUrlNormalize` was renamed to `skipProxyUrlNormalize` (these are not under `experimental`). The check at config.ts:996-1003 forbids setting both, then aliases whichever single value is set into the other so the resolved config stays backward-compatible. Use the new `skipProxyUrlNormalize` key.
Source
Thrown at packages/next/src/server/config.ts:1000
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.'
)
}
// Map Proxy config to Middleware config as it is currently an alias.
if (
userConfig.experimental?.proxyClientMaxBodySize === undefined &&
userConfig.experimental?.middlewareClientMaxBodySize !== undefined
) {
result.experimental.proxyClientMaxBodySize =
userConfig.experimental.middlewareClientMaxBodySize
}
if (
userConfig.experimental?.proxyPrefetch === undefined &&
userConfig.experimental?.middlewarePrefetch !== undefined
) {
result.experimental.proxyPrefetch =
userConfig.experimental.middlewarePrefetchView on GitHub (pinned to 0ae8c72462)
Solutions
- Remove `skipMiddlewareUrlNormalize` and keep `skipProxyUrlNormalize`.
- Re-run the build to confirm the URL-normalization skip is applied as intended.
- Note this option lives at the top level, not inside `experimental`.
Example fix
// before
module.exports = { skipProxyUrlNormalize: true, skipMiddlewareUrlNormalize: true }
// after
module.exports = { skipProxyUrlNormalize: true } Defensive patterns
Strategy: validation
Validate before calling
if (config.skipProxyUrlNormalize !== undefined && config.skipMiddlewareUrlNormalize !== undefined) {
throw new Error('set only skipProxyUrlNormalize (top-level, not experimental)');
} Prevention
- Remember skipProxyUrlNormalize/skipMiddlewareUrlNormalize are top-level, not under experimental.
- After upgrades, grep for `skipMiddlewareUrlNormalize` and remove it.
When it happens
Trigger: Setting both `skipProxyUrlNormalize: true` and `skipMiddlewareUrlNormalize: true` at the top level of the config.
Common situations: Upgrading Next.js and adding the new key without deleting the old one. Sharing a config preset that still references the middleware name.
Related errors
- Config options `experimental.proxyClientMaxBodySize` and `ex
- Config options `experimental.proxyPrefetch` and `experimenta
- Config options `experimental.externalProxyRewritesResolve` a
- Client Max Body Size must be a valid number (bytes) or files
- Client Max Body Size must be larger than 0 bytes
AI-assisted analysis of vercel/next.js@0ae8c72462 (2026-08-06).
Data as JSON: /api/errors/d8e0015c96148d5e.
Report an issue: GitHub.