You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
whereas if I skip it during prerendering, it succeeds 👍
exportdefaulteventHandler(async()=>{// Skip during prerenderingif(import.meta.prerender)returnreturn(awaithubKV().get('example'))});
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:
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.
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?
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.
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
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: