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

Dynamic routes failing in 13.1.2 "Error: invariant: invalid Cache-Control duration provided: 0 < 1" #44875

Open
1 task done
DavidTParks opened this issue Jan 14, 2023 · 10 comments · May be fixed by #44989
Open
1 task done
Labels
template: bug A user has filled out the bug report template. Issue needs triaging

Comments

@DavidTParks
Copy link

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 18.12.1
npm: 8.19.2
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.1.3-canary.0
eslint-config-next: 13.0.5
react: 18.2.0
react-dom: 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue

https://github.com/DavidTParks/vamp

To Reproduce

Clone the repository, run npm run build and try to navigate to a dynamic route. It will error out and throw in the terminal

Error: invariant: invalid Cache-Control duration provided: 0 < 1

Describe the Bug

The bug seems to happen when navigating to a dynamic route. Occurs only in production, both locally building and on Vercel.

Error: invariant: invalid Cache-Control duration provided: 0 < 1

When trying to navigate via a next/link to a dynamic route.

Expected Behavior

Route to the route without throwing

Which browser are you using? (if relevant)

Chrome

How are you deploying your application? (if relevant)

Vercel

@DavidTParks DavidTParks added the template: bug A user has filled out the bug report template. Issue needs triaging label Jan 14, 2023
@erhise
Copy link

erhise commented Jan 14, 2023

+1

@s4pp1
Copy link

s4pp1 commented Jan 15, 2023

I have the same error. +1

@codeh007
Copy link

+1

1 similar comment
@schimi-dev
Copy link

+1

@focux
Copy link

focux commented Jan 16, 2023

I'm having the same issue. Had to downgrade next to 13.1.1 and it's working back again.

@lassegit
Copy link

@focux Same here. Deployed 13.1.2 to production late friday afternoon 😂.

@yajinn
Copy link

yajinn commented Jan 16, 2023

+1

@tolerance-go
Copy link

+1 @focux works for me, to downgrade 13.1.1

@DavidTParks
Copy link
Author

+1 @focux works for me, to downgrade 13.1.1

Yep downgraded for now

@ijjk ijjk linked a pull request Jan 18, 2023 that will close this issue
3 tasks
@schimi-dev
Copy link

Hi,
just for your information, doing export const revalidate = 0 as described here in all pages and layouts that have to be dynamic solved the problem for me. Maybe that helps some of you too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
template: bug A user has filled out the bug report template. Issue needs triaging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants