-
Notifications
You must be signed in to change notification settings - Fork 87
Revalidate doesn't work always with Netlify Functions #321
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
Comments
@saidattax hey! thank you so much for opening such a wonderful and detailed issue. we really appreciate the time and thoughtfulness you spent. unfortunately this has been a request/known issue on the platform for nearly a year 😲 (see #151). this is netlify's most recent work to address this issue: #151 (comment). for this reason, i'll close your issue, but feel free to direct any additional comments/feedback to #151!! ❤️ |
Hey @lindsaylevine ! Thanks for getting back. However, I have another project where I use the same It can also be seen in it's function Here's the deploy id Any idea how it's working there but not in this one? Did I do something there that I missed here? Thanks |
Also, a different issue I found, In my package.json I have fixed the version of the plugin
But in the build, it is taking the latest version? 🤔
Here's the deploy id This is supposed to say |
|
ok, i see now. your site in the original issue body is not updating. this is because, i believe, you're using fallback: true, which means (as of the most recent plugin version) we cache the first function response. if you take that out, it should work as you expect. |
Thank you so much for the help @lindsaylevine ! That fixes it :) |
yay!! happy to help ❤️ :D |
Describe the bug
I have a page which has an option
revalidate: 5,
. It works fine withnetlify dev
. However, when I deploy it and run on netlify, the serverless functions are not being triggered on refresh after 5 seconds.I made a small test using codesanbox server and a next js site which shows the current time. The time is calculated on the server and sent to the next js app which is handled using
getStaticProps
. There's also a couple of routes sent via the server togetStaticPaths
To Reproduce
Steps to reproduce the behavior:
Link to Github Repo: https://github.com/saidattax/next-js-test
Expected behavior
Everytime on refresh, atleast after 5 seconds, the serverless function should trigger to get the latest
getStaticProps
Versions
If you're using the CLI to build
If you're using file-based installation
The text was updated successfully, but these errors were encountered: