vercel/next.js · error

Invalid "devIndicator.position" provided, expected one of ${

Error message

Invalid "devIndicator.position" provided, expected one of ${allowedValues.join(', ')}, received ${position}

What it means

Thrown at config.ts:1366 during devIndicators normalization when `devIndicators.position` is set to a value not in `['top-left','top-right','bottom-left','bottom-right']`. This only runs when `devIndicators !== false` and a `position` is provided.

Source

Thrown at packages/next/src/server/config.ts:1367

      localeDetectionType !== 'undefined'
    ) {
      throw new Error(
        `Specified i18n.localeDetection should be undefined or a boolean received ${localeDetectionType}.\nSee more info here: https://nextjs.org/docs/messages/invalid-i18n-config`
      )
    }
  }

  if (result.devIndicators !== false && result.devIndicators?.position) {
    const { position } = result.devIndicators
    const allowedValues = [
      'top-left',
      'top-right',
      'bottom-left',
      'bottom-right',
    ]

    if (!allowedValues.includes(position)) {
      throw new Error(
        `Invalid "devIndicator.position" provided, expected one of ${allowedValues.join(
          ', '
        )}, received ${position}`
      )
    }
  }

  result.expireTime = normalizeInfiniteDuration(result.expireTime, 'expireTime')
  const staleTimes = result.experimental.staleTimes
  if (staleTimes) {
    staleTimes.dynamic = normalizeInfiniteDuration(
      staleTimes.dynamic,
      'experimental.staleTimes.dynamic'
    )
    staleTimes.static = normalizeInfiniteDuration(
      staleTimes.static,
      'experimental.staleTimes.static'
    )

View on GitHub (pinned to 0ae8c72462)

Solutions

  1. Use one of the four exact kebab-case values: 'top-left', 'top-right', 'bottom-left', 'bottom-right'.
  2. To disable the dev indicator entirely, set `devIndicators: false`.

Example fix

// before
module.exports = { devIndicators: { position: 'topRight' } }
// after
module.exports = { devIndicators: { position: 'top-right' } }
Defensive patterns

Strategy: validation

Validate before calling

const allowed = ['top-left','top-right','bottom-left','bottom-right'];
if (devIndicators?.position && !allowed.includes(devIndicators.position)) {
  throw new Error('invalid devIndicators.position');
}

Type guard

function isValidPosition(p: unknown): p is 'top-left'|'top-right'|'bottom-left'|'bottom-right' {
  return typeof p === 'string' && ['top-left','top-right','bottom-left','bottom-right'].includes(p);
}

Prevention

When it happens

Trigger: `devIndicators: { position: 'topRight' }` (camelCase); `devIndicators: { position: 'top' }`; `devIndicators: { position: 'center' }`; typos like `'bottomleft'`.

Common situations: Using camelCase instead of kebab-case; copying an outdated example; older Next versions accepted different position strings.

Related errors


AI-assisted analysis of vercel/next.js@0ae8c72462 (2026-08-06). Data as JSON: /api/errors/b0cee96fa3a254b7. Report an issue: GitHub.