Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incremental Static Regeneration (ISR) Not Functioning as Expected in Next.js 15 #72456

Open
samstr opened this issue Nov 7, 2024 · 0 comments
Labels
bug Issue was opened via the bug report template.

Comments

@samstr
Copy link

samstr commented Nov 7, 2024

Link to the code that reproduces this issue

https://github.com/samstr/isr-demo-nextjs15

To Reproduce

NextJS 14 Demo: https://github.com/samstr/isr-demo-nextjs14
NextJS 15 Demo: https://github.com/samstr/isr-demo-nextjs15

  1. Clone demo repo (isr-demo-nextjs14)
  2. npm install
  3. npm run build
  4. Go to http://localhost:3000/ and click the example links

Current vs. Expected behavior

The expected behavior is for pages that implement ISR should be cached for the time specified using the revalidate const.

In NextJS14 this works, but in NextJS 15 I can't seem to get the same behavior.

The npm run build output treats the route differently.

NextJS 14
Screenshot 2024-11-07 at 10 51 33

NextJS 15
Screenshot 2024-11-07 at 10 59 05

I understand that NextJS 15 introduced a new 'uncached by default' concept for route handlers and fetch requests etc, but I didn't think that was related to server rendered pages that are using revalidate.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6020
  Available memory (MB): 98304
  Available CPU cores: 12
Binaries:
  Node: 18.18.0
  npm: 9.8.1
  Yarn: N/A
  pnpm: 7.22.0
Relevant Packages:
  next: 15.0.2 // Latest available version is detected (15.0.2).
  eslint-config-next: 15.0.2
  react: 19.0.0-rc-02c0e824-20241028
  react-dom: 19.0.0-rc-02c0e824-20241028
  typescript: 5.6.3
Next.js Config:
  output: N/A

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

Not sure

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

next dev (local), next build (local), next start (local), Vercel (Deployed)

Additional context

No response

@samstr samstr added the bug Issue was opened via the bug report template. label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

1 participant