I am trying to add a new binding for R2 after deploying my application on cloudflare in wrangler.tom

, but my pages functions are not picking these newly added bindings and not showing up on settings tab. It doesn't allow me to edit it saying, this project's binding is managed by wrangler.toml, I did add R2 binding on my wrangler.toml. I think, due to this my c.env.MY_BUCKET is coming as undefined at run time.
1 Reply
anand248
anand2482w ago
Found the solution, logs helped me - "env.production" environment configuration - "r2_buckets" exists at the top level, but not on "env.production". This is not what you probably want, since "r2_buckets" is not inherited by environments. Please add "r2_buckets" to "env.production".
Want results from more Discord servers?
Add your server