As the title states I'm trying to develop a pages app with functions for a very small backend, but I cannot get kv to work. Attached are the errors when running wrangler dev.
This seems to be a very common problem and I've seen issues about it since 2022 on github but everything seems to be magically fixed, except it doesn't work, at least for me
my wrangler.toml
name = "resourcinator"compatibility_date = "2024-10-24"main = "./.svelte-kit/cloudflare/_worker.js"[build]command = "yarn run build"# Environment variables (if needed)[vars]# Example: API_KEY = "your_api_key"# KV Namespace binding for production environment[[kv_namespaces]]binding = "RESOURCES_KV"id = "my_id"preview_id = "my_id"
name = "resourcinator"compatibility_date = "2024-10-24"main = "./.svelte-kit/cloudflare/_worker.js"[build]command = "yarn run build"# Environment variables (if needed)[vars]# Example: API_KEY = "your_api_key"# KV Namespace binding for production environment[[kv_namespaces]]binding = "RESOURCES_KV"id = "my_id"preview_id = "my_id"
You can now use your framework’s development server while accessing D1 databases, R2 object stores, AI models, and more. Iterate locally in milliseconds to build sophisticated web apps that run on Cloudflare