namespace is not valid

Hey I'm trying to deploy a new worker project which just has 1 binding to a KV. It works locally, but when I deploy to CF I get this error: KV namespace 'opencal_api_kv' is not valid. [code: 10042] Been banging my head for a while.... I have a wrangler.jsonc with this top level key:
"kv_namespaces": [
{
"binding": "OPENCAL_KV",
"preview_id": "opencal_api_kv",
"id": "opencal_api_kv"
}
"kv_namespaces": [
{
"binding": "OPENCAL_KV",
"preview_id": "opencal_api_kv",
"id": "opencal_api_kv"
}
I have tried manually setting it in the dashboard as well, but no change. The KV namespace exists, I can use wrangler kv namespace list and it lists it. Not sure what else to check?
2 Replies
Walshy
Walshy2mo ago
You need the hex id not the name, it should list it as well under namespace list
sdairs
sdairsOP2mo ago
GUH well thats annoyingly obvious now 🤦‍♂️ that worked 😓 thank you

Did you find this page helpful?