This post should be helpful https://discord.com/channels/595317990191398933/1069741830566068396/1069
This post should be helpful Is it possible to test KV with wrangler locally on a sveltekit project?
workerd does not currently have any debugger support, and since wranglerv3 uses workerd instead of Node-base miniflare emulation to run your Workers, it is not possible at the momentworkerd
wrangler dev or wrangler kv:* commands?kv:* has always operated on remote namespaces as far as I'm aware, it has no --local flagexport default) don't have bindings as globals, it's under env which is the 2nd argument passed to a handlerwrangler dev in wrangler 3 uses a local version of workerd by default, which is very limited in terms of the OS versions it supports unfortunately.--remote runs your code on a remote Cloudflare controlled server, so it's a bit slower, but you avoid the need for local workerdwrangler@2 for now, which uses a more simulated local environment with node.jswranglerv3wrangler kv:*kv:*wrangler@2export default {
async fetch(req, env, ctx) {
// ...
console.log(env.TOKEN);
// ...
}
}