Service binding with pages not working

Ive got a regular worker that im trying to bind to a pages worker so it can forward requests on to it using env.ui_search_trip.fetch(newRequest) ... However im unsure whether CF support binding pages to workers as when i run my deployment it fails attempting to bind
workers.api.error.service_binding_error: could not resolve binding "ui_search_trip": script
"ui-search-trip" not found [code: 10143
workers.api.error.service_binding_error: could not resolve binding "ui_search_trip": script
"ui-search-trip" not found [code: 10143
and when i add environment = production i get a similar error. Should this work? I also cant see the pages in the list of services to bind when im in the dashboard of this parent worker so not sure if it is supported. Heres my wrangler.toml
account_id = "x"
main = "src/index.ts"
compatibility_date = "2024-04-03"
compatibility_flags = ["nodejs_compat"]
[[services]]
binding = "ui_search_trip"
service = "ui-search-trip"

[env.production]
compatibility_date = "2024-04-03"

[[env.production.services]]
binding = "ui_search_trip"
service = "ui-search-trip"
account_id = "x"
main = "src/index.ts"
compatibility_date = "2024-04-03"
compatibility_flags = ["nodejs_compat"]
[[services]]
binding = "ui_search_trip"
service = "ui-search-trip"

[env.production]
compatibility_date = "2024-04-03"

[[env.production.services]]
binding = "ui_search_trip"
service = "ui-search-trip"
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server