vercel/next.js · error
${shouldInterpolate ? 'Interpolating href' : 'Mismatching `a
Error message
${shouldInterpolate ? 'Interpolating href' : 'Mismatching `as` and `href`'} failed to manually provide the params: ${missingParams.join(', ')} in the `href`'s `query` What it means
Error "${shouldInterpolate ? 'Interpolating href' : 'Mismatching `as` and `href`'} failed to manually provide the params: ${missingParams.join(', ')} in the `href`'s `query`" thrown in vercel/next.js.
Source
Thrown at packages/next/src/shared/lib/router/router.ts:1586
if (isDynamicRoute(route)) {
const parsedAs = parseRelativeUrl(resolvedAs)
const asPathname = parsedAs.pathname
const routeRegex = getRouteRegex(route)
routeMatch = getRouteMatcher(routeRegex)(asPathname)
const shouldInterpolate = route === asPathname
const interpolatedAs = shouldInterpolate
? interpolateAs(route, asPathname, query)
: ({} as { result: undefined; params: undefined })
if (!routeMatch || (shouldInterpolate && !interpolatedAs.result)) {
const missingParams = Object.keys(routeRegex.groups).filter(
(param) => !query[param] && !routeRegex.groups[param].optional
)
if (missingParams.length > 0 && !isMiddlewareMatch) {
if (process.env.NODE_ENV !== 'production') {
console.warn(
`${
shouldInterpolate
? `Interpolating href`
: `Mismatching \`as\` and \`href\``
} failed to manually provide ` +
`the params: ${missingParams.join(
', '
)} in the \`href\`'s \`query\``
)
}
throw new Error(
(shouldInterpolate
? `The provided \`href\` (${url}) value is missing query values (${missingParams.join(
', '
)}) to be interpolated properly. `
: `The provided \`as\` value (${asPathname}) is incompatible with the \`href\` value (${route}). `) +
`Read more: https://nextjs.org/docs/messages/${View on GitHub (pinned to 0eb3775416)
Solutions
- Provide the missing dynamic params in the `query` object of the href, e.g. `{ pathname: '/post/[id]', query: { id } }`.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/next/src/shared/lib/router/router.ts:1586 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/b885dcf4b410349a.
Report an issue: GitHub.