vercel/next.js · error · Error

Invalid interception route: ${path}. Cannot use (..)(..) mar

Error message

Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.

What it means

extractInterceptionRouteInformation rejects the (..)(..) marker (two levels up) when the intercepting route sits at the root or only one level deep: there is no directory two levels above, so the intercepted route could never be resolved to a real segment.

Source

Thrown at packages/next/src/shared/lib/router/utils/interception-routes.ts:93

          `Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`
        )
      }
      interceptedRoute = interceptingRoute
        .split('/')
        .slice(0, -1)
        .concat(interceptedRoute)
        .join('/')
      break
    case '(...)':
      // (...) will match the route segment in the root directory, so we need to use the root directory to prepend the intercepted route
      interceptedRoute = '/' + interceptedRoute
      break
    case '(..)(..)':
      // (..)(..) indicates that we should match at two levels up, so we need to remove the last two segments of the intercepting route

      const splitInterceptingRoute = interceptingRoute.split('/')
      if (splitInterceptingRoute.length <= 2) {
        throw new Error(
          `Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`
        )
      }

      interceptedRoute = splitInterceptingRoute
        .slice(0, -2)
        .concat(interceptedRoute)
        .join('/')
      break
    default:
      throw new Error('Invariant: unexpected marker')
  }

  return { interceptingRoute, interceptedRoute }
}

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Move the (..)(..) marker deeper in the route tree; it cannot be at root or one level up.
Defensive patterns

Strategy: validation

When it happens

Trigger: The (..)(..) interception marker is used at or near the root level.

Common situations: Using (..)(..) where there are not enough parent segments to traverse.


AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19). Data as JSON: /api/errors/3ebc8591bf337d4c. Report an issue: GitHub.