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

cacheLife with revalidate < 1 causes error in production only #74660

Open
jonathanhefner opened this issue Jan 8, 2025 · 0 comments
Open

cacheLife with revalidate < 1 causes error in production only #74660

jonathanhefner opened this issue Jan 8, 2025 · 0 comments
Labels
bug Issue was opened via the bug report template. dynamicIO Related to dynamicIO.

Comments

@jonathanhefner
Copy link
Contributor

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/wonderful-heyrovsky-r4d52k

To Reproduce

  1. Visit the reproduction app.
  2. In the app preview (dev mode), notice everything is working (/ page content is "OK").
  3. Build the app (e.g. pnpm run build), and notice there are no errors.
  4. Run the app in production mode (e.g. pnpm run start), visit /, and see a 500 error:

    Error: Invalid revalidate configuration provided: 0.999 < 1

Current vs. Expected behavior

Current behavior: an error is thrown in production only.

Expected behavior: in my opinion, the error check should be changed to < 0, and should be enforced at least during build time, if not also in dev mode.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 15.2.0-canary.1 // Latest available version is detected (15.2.0-canary.1).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

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

dynamicIO

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

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

Additional context

No response

@jonathanhefner jonathanhefner added the bug Issue was opened via the bug report template. label Jan 8, 2025
@github-actions github-actions bot added the dynamicIO Related to dynamicIO. label Jan 8, 2025
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. dynamicIO Related to dynamicIO.
Projects
None yet
Development

No branches or pull requests

1 participant