nvm I figured it out after running

nvm I figured it out after running wrangler pages download config <PROJECT> and looking at how the generated config is setup. The service bindings should be in the production environment. The docs aren't clear about this and there aren't really any error messages during deployment
[env.production]
compatibility_date = "2024-04-06"

[[env.production.services]]
binding = "GREET"
service = "worker-hello"
environment = "production"
[env.production]
compatibility_date = "2024-04-06"

[[env.production.services]]
binding = "GREET"
service = "worker-hello"
environment = "production"
2 Replies
Adam
Adam•8mo ago
Hello 👋 Glad you were able to get this worked out! You shouldn't need to specify the environment. How were you deploying (ie. what command were you using, etc.) when the issue was happening?
Magical.Puffin
Magical.PuffinOP•8mo ago
I am running npx wrangler pages deploy after the service binding is deployed. If the service binding isn't specified for the production environment, the page gets stuck in queued. I have a basic example for replicating this issue: https://github.com/magicalpuffin/public-debug/tree/main/2024/cloudflare-pages-service-binding
Want results from more Discord servers?
Add your server