Cannot connect my worker to my KV store using the /settings, variables and KV Namespace
It just fails on me and cannot find the KV no matter what sort of structure I use.
Does anyone have a working example I can see?
2 Replies
I have working code in the worker, its just that env.KVStore never is defined
SOLVED take the env. off the call
Are you using Service Workers? (https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/#migrate-from-service-workers-to-es-modules)
Migrate from Service Workers to ES Modules · Cloudflare Workers docs
Write your Worker code in ES modules syntax for an optimized experience.