Just notice there’s a typo here:
kv_namespaces = [
{ binding = “xxxt”, id = “*******************************************” }
]
it’s just in this topic, not in towl, so, I still need help on this.
Yeah, you are right, problem solved.
Sorry, I’m not familiar with these things, but as I see, now that module syntax was used by default, cloudflare’s document should at least mention how to use it in this way, right?
Thank you so much for the help, @Walshy
‘await env.KV.get();’ solved my coding issue, but stucked on running.
Below is the whole list of error:
.internal-6d5dc2e3-0…d8e3-facade-1.js:14 TypeError: Cannot read properties of undefined (reading ‘get’)
at Object.fetch (worker.js:19:18)
at facade_modules_fetch (.internal-6d5dc2e3-0…8e3-loader.js:23:17)
at facade_invokeChain (.internal-6d5dc2e3-0…8e3-common.js:16:10)
at Object.next (.internal-6d5dc2e3-0…8e3-common.js:13:14)
at jsonError (.internal-6d5dc2e3-0…3-facade-1.js:12:32)
at facade_invokeChain (.internal-6d5dc2e3-0…8e3-common.js:16:10)
at Object.next (.internal-6d5dc2e3-0…8e3-common.js:13:14)
at scheduled (.internal-6d5dc2e3-0…e3-facade-0.js:9:24)
at facade_invokeChain (.internal-6d5dc2e3-0…8e3-common.js:16:10)
at facade_invoke (.internal-6d5dc2e3-0…8e3-common.js:19:10)