vercel/next.js · error · Error
Unknown \`cacheLife()\` profile "${profile}" is not configur
Error message
Unknown \`cacheLife()\` profile "${profile}" is not configured in next.config.js\nmodule.exports = {\n cacheLife: {\n "${profile}": ...\n }\n} What it means
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.
Source
Thrown at packages/next/src/server/use-cache/cache-life.ts:73
if (typeof profile === 'string') {
const workStore = workAsyncStorage.getStore()
if (!workStore) {
throw new Error(
'`cacheLife()` can only be called during App Router rendering at the moment.'
)
}
// TODO: This should be globally available and not require an AsyncLocalStorage.
const configuredProfile = workStore.cacheLifeProfiles[profile]
if (configuredProfile === undefined) {
if (workStore.cacheLifeProfiles[profile.trim()]) {
throw new Error(
`Unknown \`cacheLife()\` profile "${profile}" is not configured in next.config.js\n` +
`Did you mean "${profile.trim()}" without the spaces?`
)
}
throw new Error(
`Unknown \`cacheLife()\` profile "${profile}" is not configured in next.config.js\n` +
'module.exports = {\n' +
' cacheLife: {\n' +
` "${profile}": ...\n` +
' }\n' +
'}'
)
}
profile = configuredProfile
} else if (
typeof profile !== 'object' ||
profile === null ||
Array.isArray(profile)
) {
throw new Error(
'Invalid `cacheLife()` option. Either pass a profile name or object.'
)
} else {View on GitHub (pinned to 258b1c1bc0)
Solutions
- Define the profile under cacheLife in next.config.js as shown, or use an existing profile name.
Defensive patterns
Strategy: validation
When it happens
Trigger: cacheLife() receives a profile not configured in next.config.
Common situations: Calling cacheLife('name') where 'name' is missing from the cacheLife config object.
AI-assisted analysis of vercel/next.js@258b1c1bc0 (2026-08-19).
Data as JSON: /api/errors/c52646575da6fb22.
Report an issue: GitHub.