nextjs - ✅(Solved) Fix Docs: revalidateTag in v16 docs shows profile as optional [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#85281Fetched 2026-04-08 02:16:35
View on GitHub
Comments
1
Participants
2
Timeline
11
Reactions
3
Assignees
Timeline (top)
referenced ×4assigned ×1closed ×1commented ×1

Fix Action

Fixed

PR fix notes

PR #85284: docs: revalidateTag requires second argument

Description (problem / solution / changelog)

Closes: https://github.com/vercel/next.js/issues/85281

Changed files

  • docs/01-app/03-api-reference/04-functions/revalidateTag.mdx (modified, +3/-1)
RAW_BUFFERClick to expand / collapse

What is the documentation issue?

revalidateTag() in v16 docs shows profile as optional when it's not - in the docs:

revalidateTag(tag: string, profile?: string | { expire?: number }): void;

https://nextjs.org/docs/app/api-reference/functions/revalidateTag#parameters

Type in revalidate.d.ts

export declare function revalidateTag(tag: string, profile: string | CacheLifeConfig): undefined;

Profile must be set. It's not optional. I have 150 instances of revalidateTag in my codebase. Would be great if this was optional or had a default.

Is there any context that might help us understand?

No additional context

Does the docs page already exist? Please link to it.

https://nextjs.org/docs/app/api-reference/functions/revalidateTag#parameters

extent analysis

TL;DR

Update the revalidateTag function calls to always include the profile parameter, as it is not optional despite the documentation suggesting it is.

Guidance

  • Review the 150 instances of revalidateTag in the codebase to ensure profile is provided for each call.
  • Verify the type definition in revalidate.d.ts to confirm that profile is indeed a required parameter.
  • Consider reaching out to the Next.js documentation team to correct the documentation to reflect that profile is not optional.
  • If possible, explore adding a default value for the profile parameter or making it optional in a future version of the revalidateTag function.

Example

No code snippet is provided as the issue is related to documentation and type definitions rather than a specific code implementation.

Notes

The fix involves updating existing code to comply with the actual requirement of the revalidateTag function, which may require significant changes if the function is widely used.

Recommendation

Apply workaround: Update all revalidateTag function calls to include the profile parameter, as this is the current requirement despite the documentation error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - ✅(Solved) Fix Docs: revalidateTag in v16 docs shows profile as optional [1 pull requests, 1 comments, 2 participants]