wrangler ignores KV bindings in config
I've used the following in my wrangler.toml:
. However, once I deploy the worker, the KV binding gets removed and is no longer available in the code and not visible in the dashboard as binded. However, I can add it in the dashboard and it works the wrangler.toml code by the dash doesn't change anything, it's the same)
7 Replies
Any chance you have different configuration parameters for different environments?
not sure what you mean
I only use prod rn, no staging/dev
What's your full wrangler.toml?
(is the kv id something i have to censor?)
Nope, but you need to move stuff above
[placement]
or change it to be tables as well.
Basically, since you defined a table ([placement]
) then anything under that until another table or EOF, is under the [placement]
table.
You basically defined placement.browser
& placement.kv_namespaces
, rather than having top-level browser
and kv_namespaces
keys.
Using tables ([browser]
and [[kv_namespaces]]
) avoids that.
If you don't want to use tables for those, just move the browser
and kv_namespaces
lines above [placement]
oh
never used toml before xD
ty
toml is a silly format IMO 😛