I’m new to Cloudflare/Wrangler, but it seems like the documentation is missing something as
following the directions don’t seem to work.
Starting from here:
- I run the first command as
wrangler kv:namespace create apikeys
🌀 Creating namespace with title "emailvalidator-apikeys" ✨ Success! Add the following to your configuration file in your kv_namespaces array: { binding = "apikeys", id ="4818.........aa2c" }
- I have a wrangler.toml file, and I add it to the kv_namespaces array:
kv_namespaces = [ { binding = "apikeys", id = "4818.........aa2c" } ]
- I attempt to add a key/value entry with Wrangler:
wrangler kv:key put --binding=apikeys "MYKEY" "MYKEYVALUE"
✘ [ERROR] No KV Namespaces configured! Either use --namespace-id to upload directly or add a KV namespace to your wrangler config file.
What am I missing? I already validated in the Cloudflare platform that the namespace does exist, named as expected from the documentation as emailvalidator-apikeys
.