vercel/next.js · error · Error

Invalid profile provided "${profile}" must be configured und

Error message

Invalid profile provided "${profile}" must be configured under cacheLife in next.config or be "max"

What it means

Profile lookup in revalidateTags: a cacheLife profile name attached to revalidated tags is neither a key in the configured cacheLife profiles in next.config nor the built-in "max". The faulting input is the profile string used with cacheLife()/tagged revalidation; without a resolvable profile the expire duration for those tags is unknown.

Source

Thrown at packages/next/src/server/revalidation-utils.ts:155

  // Process each profile group
  for (const [profile, tagsForProfile] of tagsByProfile) {
    // Look up the cache profile from workStore if available
    let durations: { expire?: number } | undefined

    if (profile) {
      let cacheLife:
        | { stale?: number; revalidate?: number; expire?: number }
        | undefined

      if (typeof profile === 'object') {
        // Profile is already a cacheLife configuration object
        cacheLife = profile
      } else if (typeof profile === 'string') {
        // Profile is a string key, look it up in workStore
        cacheLife = workStore?.cacheLifeProfiles[profile]

        if (!cacheLife) {
          throw new Error(
            `Invalid profile provided "${profile}" must be configured under cacheLife in next.config or be "max"`
          )
        }
      }

      if (cacheLife) {
        durations = {
          expire: cacheLife.expire,
        }
      }
    }
    // If profile is not found and not 'max', durations will be undefined
    // which will trigger immediate expiration in the cache handler

    for (const handler of handlers || []) {
      if (profile) {
        promises.push(handler.updateTags?.(tagsForProfile, durations))
      } else {

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Configure the profile under cacheLife in next.config.js, or use the built-in "max" profile.
Defensive patterns

Strategy: validation

When it happens

Trigger: A revalidate/cacheLife profile name is not configured.

Common situations: Using a cacheLife profile string not defined under cacheLife in next.config and not 'max'.


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