nextjs - 💡(How to fix) Fix Wrong link in nextjs dev tools error dialogue when using "use cache" directive with no cacheComponents feature flag set [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#85397Fetched 2026-04-08 02:15:58
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×2closed ×1commented ×1issue_type_added ×1

Error Message

Ecmascript file had an error Actual > https://nextjs.org/docs/canary/app/api-reference/directives/use-cache#usage throws 404 error Error Handling

Code Example

Ecmascript file had an error
> 1 | 'use cache'
    | ^^^^^^^^^^^

To use "use cache", please enable the feature flag `cacheComponents` in your Next.js config.

Read more: **https://nextjs.org/docs/canary/app/api-reference/directives/use-cache#usage**

---

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32528
  Available CPU cores: 8
Binaries:
  Node: 22.16.0
  npm: 11.2.0
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.0.0 // Latest available version is detected (16.0.0).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/vercel/next.js

To Reproduce

  1. Start app in local dev
  2. Use the "use cache" flag without having cacheComponents feature flag enabled
  3. Click the link to proper usage

Current vs. Expected behavior

Ecmascript file had an error
> 1 | 'use cache'
    | ^^^^^^^^^^^

To use "use cache", please enable the feature flag `cacheComponents` in your Next.js config.

Read more: **https://nextjs.org/docs/canary/app/api-reference/directives/use-cache#usage**

Expected > https://nextjs.org/docs/app/api-reference/directives/use-cache

Actual > https://nextjs.org/docs/canary/app/api-reference/directives/use-cache#usage throws 404 error

This link needs updating https://nextjs.org/docs/canary/app/api-reference/directives/use-cache#usage to the one that works

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32528
  Available CPU cores: 8
Binaries:
  Node: 22.16.0
  npm: 11.2.0
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.0.0 // Latest available version is detected (16.0.0).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Error Handling

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

extent analysis

TL;DR

Enable the cacheComponents feature flag in the Next.js config to resolve the error when using the "use cache" flag.

Guidance

  • The error message indicates that the cacheComponents feature flag is not enabled, which is required to use the "use cache" flag.
  • To fix the issue, update the Next.js config to include the cacheComponents feature flag.
  • Verify that the cacheComponents feature flag is correctly enabled by checking the Next.js config file.
  • Update the link in the error message to point to the correct documentation: https://nextjs.org/docs/app/api-reference/directives/use-cache.

Example

No code snippet is provided as it is not necessary for this issue.

Notes

The issue is specific to the next dev stage and is related to Error Handling. The fix should be applied to the local development environment.

Recommendation

Apply workaround: Enable the cacheComponents feature flag in the Next.js config, as this is the required step to resolve the error when using the "use cache" flag.

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 - 💡(How to fix) Fix Wrong link in nextjs dev tools error dialogue when using "use cache" directive with no cacheComponents feature flag set [1 comments, 2 participants]