emilycheyne
emilycheyne
CDCloudflare Developers
Created by emilycheyne on 3/6/2024 in #workers-help
Workers KV get throws TypeError: Cannot read properties of undefined (reading 'get')
Ah, thanks for the hint! I changed the binding to: [[kv_namespaces]] binding = "BH_API_KEYS" id = "xxx" and everything is working as expected
5 replies
CDCloudflare Developers
Created by emilycheyne on 3/6/2024 in #workers-help
Workers KV get throws TypeError: Cannot read properties of undefined (reading 'get')
hmm, i am not sure what you mean. This is what my entire wrangler.toml file looks like:
name = "vms-receiver-email-camect"
main = "src/index.ts"
compatibility_date = "2024-03-04"

# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
# https://dash.cloudflare.com/946e6bcae03c19645421637bc83c9232/workers/kv/namespaces/65a1763d5ec540ad9c46c8495f5623ae
kv_namespaces = [
{ binding = "BH_API_KEYS", id = "xxx" }
]
name = "vms-receiver-email-camect"
main = "src/index.ts"
compatibility_date = "2024-03-04"

# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
# https://dash.cloudflare.com/946e6bcae03c19645421637bc83c9232/workers/kv/namespaces/65a1763d5ec540ad9c46c8495f5623ae
kv_namespaces = [
{ binding = "BH_API_KEYS", id = "xxx" }
]
5 replies
CDCloudflare Developers
Created by emilycheyne on 3/6/2024 in #workers-help
Workers KV get throws TypeError: Cannot read properties of undefined (reading 'get')
If it's relevant I am using
wrangler 3.31.0
wrangler 3.31.0
5 replies