{"record":{"id":"0a1e1d6f0dfdf77b","repo":"vercel/next.js","slug":"revalidatetag-without-the-second-argument-is-now","errorCode":null,"errorMessage":"\"revalidateTag\" without the second argument is now deprecated, add second argument of \"max\" or use \"updateTag\". See more info here: https://nextjs.org/docs/messages/revalidate-tag-single-arg","messagePattern":"\"revalidateTag\" without the second argument is now deprecated, add second argument of \"max\" or use \"updateTag\"\\. See more info here: https://nextjs\\.org/docs/messages/revalidate-tag-single-arg","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/web/spec-extension/revalidate.ts","lineNumber":35,"sourceCode":"import { createRevalidateDuringRenderError } from '../../use-cache/use-cache-messages'\nimport { validateAndNormalizeCacheLifeProfile } from '../../use-cache/cache-life-profile'\n\ntype CacheLifeConfig = {\n  expire?: number\n}\n\n/**\n * This function allows you to purge [cached data](https://nextjs.org/docs/app/building-your-application/caching) on-demand for a specific cache tag.\n *\n * The second argument specifies a [`cacheLife`](https://nextjs.org/docs/app/api-reference/functions/cacheLife#reference) profile\n * (e.g. `\"max\"`), or a `{ expire }` object. For immediate expiration in Server Actions, use\n * [`updateTag`](https://nextjs.org/docs/app/api-reference/functions/updateTag) instead.\n *\n * Read more: [Next.js Docs: `revalidateTag`](https://nextjs.org/docs/app/api-reference/functions/revalidateTag)\n */\nexport function revalidateTag(tag: string, profile: string | CacheLifeConfig) {\n  if (!profile) {\n    console.warn(\n      '\"revalidateTag\" without the second argument is now deprecated, add second argument of \"max\" or use \"updateTag\". See more info here: https://nextjs.org/docs/messages/revalidate-tag-single-arg'\n    )\n  } else if (typeof profile === 'object') {\n    profile = validateAndNormalizeCacheLifeProfile(profile, { kind: 'inline' })\n  }\n  return revalidate(\n    [encodeHeaderSafe(tag)],\n    `revalidateTag(${JSON.stringify(tag)})`,\n    profile\n  )\n}\n\n/**\n * This function allows you to update [cached data](https://nextjs.org/docs/app/building-your-application/caching) on-demand for a specific cache tag.\n * This can only be called from within a Server Action to enable read-your-own-writes semantics.\n *\n * Read more: [Next.js Docs: `updateTag`](https://nextjs.org/docs/app/api-reference/functions/updateTag)\n */","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/vercel/next.js/blob/258b1c1bc05f7099816b88f70b7b3422b24a4b8d/packages/next/src/server/web/spec-extension/revalidate.ts#L17-L53","documentation":"Error \"\"revalidateTag\" without the second argument is now deprecated, add second argument of \"max\" or use \"updateTag\". See more info here: https://nextjs.org/docs/messages/revalidate-tag-single-arg\" thrown in vercel/next.js.","triggerScenarios":"Thrown at packages/next/src/server/web/spec-extension/revalidate.ts:34 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call `revalidateTag(tag, \"max\")` or switch to `updateTag(tag)`."],"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"}