{"record":{"id":"ed7ead9364754e14","repo":"vercel/next.js","slug":"unknown-cachelife-profile-profile-is-no","errorCode":null,"errorMessage":"Unknown \\`cacheLife()\\` profile \"${profile}\" is not configured in next.config.js\\nDid you mean \"${profile.trim()}\" without the spaces?","messagePattern":"Unknown \\\\`cacheLife\\(\\)\\\\` profile \"(.+?)\" is not configured in next\\.config\\.js\\\\nDid you mean \"(.+?)\" without the spaces\\?","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/use-cache/cache-life.ts","lineNumber":68,"sourceCode":"    case 'private-cache':\n      break\n    default:\n      workUnitStore satisfies never\n  }\n\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)","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/vercel/next.js/blob/258b1c1bc05f7099816b88f70b7b3422b24a4b8d/packages/next/src/server/use-cache/cache-life.ts#L50-L86","documentation":"Validation in cacheLife(): the string profile name is not a key in workStore.cacheLifeProfiles (the profiles configured in next.config.js plus built-ins), but the trimmed version profile.trim() IS configured. This detects a whitespace typo in the profile name and suggests the trimmed variant before falling through to the general unknown-profile error.","triggerScenarios":"cacheLife() receives an unknown profile with stray whitespace.","commonSituations":"A cacheLife profile name with leading/trailing spaces that is not configured in next.config.","solutions":["Remove the extra spaces from the profile name, or define the profile under cacheLife in next.config.js."],"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-14T05:17:10.506Z"}