-
Notifications
You must be signed in to change notification settings - Fork 64
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
KV fails on prerendering #386
Comments
It is expected as actually when you build & pre-render, most of the time it is within a CI which has a fresh new directory, meaning that the KV store will be empty. What data do you expect to read from? |
I'm expecting to read up to date data, which could also be retrieved by a database but i decided to use KV for performance benefits. Would I have this issue with cloudflare's database as well?
Is there any way to defeat this? Should I switch to Cloudflare's rest api? In that case I couldn't understand how I can retrieve the secrets during prerendering. I only found this documentation here |
Sorry for the late answer, so you will need to connect to the production remote KV when pre-rendering? |
hey, yes, at least I expected that from the documentation. I was surprised when it didn't work. |
Describe the bug
When I deploy my code to cloudflare using hub's deploy command, api always returns an empty response. 👇
whereas if I skip it during prerendering, it succeeds 👍
In KV examples and documentation this solution is not observed at all. Am I doing anything wrong? I need KV to be available during prerendering as well.
The text was updated successfully, but these errors were encountered: