nextjs - 💡(How to fix) Fix Next.js 16 with cacheComponents: "Next.js cannot guarantee that Cache Components will run as expected due to the current runtime's implementation of setTimeout()." when using Bun [8 comments, 5 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#87630Fetched 2026-04-08 02:06:48
View on GitHub
Comments
8
Participants
5
Timeline
28
Reactions
0
Author
Timeline (top)
subscribed ×12commented ×8mentioned ×2cross-referenced ×1

Code Example

import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  /* config options here */
  cacheComponents: true,
};

export default nextConfig;

---

{
    "dev": "bun --bun next dev",
    "build": "bun --bun next build",
    "start": "bun --bun next start",
    "lint": "eslint"
  }

---

$ bun --bun next dev
Next.js 16.1.0 (Turbopack, Cache Components)
- Local:         http://localhost:3000
- Network:       http://10.255.255.254:3000

Starting...
Ready in 603ms

---

Next.js cannot guarantee that Cache Components will run as expected due to the current runtime's implementation of `setTimeout()`.
Please report a github issue here: https://github.com/vercel/next.js/issues/new/
 GET / 200 in 1838ms (compile: 1550ms, render: 288ms)

---

$ bun --bun next dev
Next.js 16.1.0 (Turbopack, Cache Components)
- Local:         http://localhost:3000
- Network:       http://10.255.255.254:3000

Starting...
Ready in 603ms
 GET / 200 in 1838ms (compile: 1550ms, render: 288ms)

---

$ bun --bun next dev
Next.js 16.1.0 (Turbopack, Cache Components)
- Local:         http://localhost:3000
- Network:       http://10.255.255.254:3000

Starting...
Ready in 603ms
**Next.js cannot guarantee that Cache Components will run as expected due to the current runtime's implementation of `setTimeout()`.
Please report a github issue here: https://github.com/vercel/next.js/issues/new/**
 GET / 200 in 1838ms (compile: 1550ms, render: 288ms)

---

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 15836
  Available CPU cores: 20
Binaries:
  Node: 25.2.1
  npm: 11.6.2
  Yarn: 1.22.22
  pnpm: 10.23.0
Relevant Packages:
  next: 16.1.0 // Latest available version is detected (16.1.0).
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  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/Thanaen/next-bun-cache-components

To Reproduce

  1. Create a new Next.js project with default values.
  2. Update next.config.ts to
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  /* config options here */
  cacheComponents: true,
};

export default nextConfig;
  1. Update the scripts to use bun
{
    "dev": "bun --bun next dev",
    "build": "bun --bun next build",
    "start": "bun --bun next start",
    "lint": "eslint"
  }
  1. Run bun dev Output
$ bun --bun next dev
▲ Next.js 16.1.0 (Turbopack, Cache Components)
- Local:         http://localhost:3000
- Network:       http://10.255.255.254:3000

✓ Starting...
✓ Ready in 603ms
  1. Go to http://localhost:3000 Output
Next.js cannot guarantee that Cache Components will run as expected due to the current runtime's implementation of `setTimeout()`.
Please report a github issue here: https://github.com/vercel/next.js/issues/new/
 GET / 200 in 1838ms (compile: 1550ms, render: 288ms)

Current vs. Expected behavior

I expected output:

$ bun --bun next dev
▲ Next.js 16.1.0 (Turbopack, Cache Components)
- Local:         http://localhost:3000
- Network:       http://10.255.255.254:3000

✓ Starting...
✓ Ready in 603ms
 GET / 200 in 1838ms (compile: 1550ms, render: 288ms)

Current output:

$ bun --bun next dev
▲ Next.js 16.1.0 (Turbopack, Cache Components)
- Local:         http://localhost:3000
- Network:       http://10.255.255.254:3000

✓ Starting...
✓ Ready in 603ms
**Next.js cannot guarantee that Cache Components will run as expected due to the current runtime's implementation of `setTimeout()`.
Please report a github issue here: https://github.com/vercel/next.js/issues/new/**
 GET / 200 in 1838ms (compile: 1550ms, render: 288ms)

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 15836
  Available CPU cores: 20
Binaries:
  Node: 25.2.1
  npm: 11.6.2
  Yarn: 1.22.22
  pnpm: 10.23.0
Relevant Packages:
  next: 16.1.0 // Latest available version is detected (16.1.0).
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  typescript: 5.9.3
Next.js Config:
  output: N/A

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

cacheComponents

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

next dev (local)

Additional context

Related: Bun issue

extent analysis

TL;DR

The issue can be mitigated by disabling Cache Components in next.config.ts due to a compatibility issue with Bun's implementation of setTimeout().

Guidance

  • The warning message suggests a compatibility issue between Next.js Cache Components and Bun's setTimeout() implementation, so disabling Cache Components might resolve the issue.
  • To verify, remove or set cacheComponents to false in next.config.ts and check if the warning disappears.
  • If the issue persists, consider reporting it to the Next.js GitHub issues as suggested in the warning message.
  • Review the related Bun issue (#25639) for potential updates or workarounds.

Notes

The provided information does not guarantee a complete fix, but disabling Cache Components should mitigate the warning.

Recommendation

Apply workaround: disable Cache Components in next.config.ts to avoid the compatibility issue with Bun.

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