{"record":{"id":"c52646575da6fb22","repo":"vercel/next.js","slug":"unknown-cachelife-profile-profile-is-no-c52646","errorCode":null,"errorMessage":"Unknown \\`cacheLife()\\` profile \"${profile}\" is not configured in next.config.js\\nmodule.exports = {\\n  cacheLife: {\\n    \"${profile}\": ...\\n  }\\n}","messagePattern":"Unknown \\\\`cacheLife\\(\\)\\\\` profile \"(.+?)\" is not configured in next\\.config\\.js\\\\nmodule\\.exports = (.+?)\\\\n\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/use-cache/cache-life.ts","lineNumber":73,"sourceCode":"\n  if (typeof profile === 'string') {\n    const workStore = workAsyncStorage.getStore()\n    if (!workStore) {\n      throw new Error(\n        '`cacheLife()` can only be called during App Router rendering at the moment.'\n      )\n    }\n\n    // TODO: This should be globally available and not require an AsyncLocalStorage.\n    const configuredProfile = workStore.cacheLifeProfiles[profile]\n    if (configuredProfile === undefined) {\n      if (workStore.cacheLifeProfiles[profile.trim()]) {\n        throw new Error(\n          `Unknown \\`cacheLife()\\` profile \"${profile}\" is not configured in next.config.js\\n` +\n            `Did you mean \"${profile.trim()}\" without the spaces?`\n        )\n      }\n      throw new Error(\n        `Unknown \\`cacheLife()\\` profile \"${profile}\" is not configured in next.config.js\\n` +\n          'module.exports = {\\n' +\n          '  cacheLife: {\\n' +\n          `    \"${profile}\": ...\\n` +\n          '  }\\n' +\n          '}'\n      )\n    }\n    profile = configuredProfile\n  } else if (\n    typeof profile !== 'object' ||\n    profile === null ||\n    Array.isArray(profile)\n  ) {\n    throw new Error(\n      'Invalid `cacheLife()` option. Either pass a profile name or object.'\n    )\n  } else {","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/vercel/next.js/blob/258b1c1bc05f7099816b88f70b7b3422b24a4b8d/packages/next/src/server/use-cache/cache-life.ts#L55-L91","documentation":"Validation in cacheLife(): the string profile name is not a key in workStore.cacheLifeProfiles and no near-miss (trimmed) match exists either. The error names the unknown profile and shows the exact next.config.js cacheLife object shape needed to register it — the input at fault is the profile string passed to cacheLife() versus the configured profiles.","triggerScenarios":"cacheLife() receives a profile not configured in next.config.","commonSituations":"Calling cacheLife('name') where 'name' is missing from the cacheLife config object.","solutions":["Define the profile under cacheLife in next.config.js as shown, or use an existing profile name."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"258b1c1bc05f7099816b88f70b7b3422b24a4b8d","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}