I’m really happy to see Cloudflare add

I’m really happy to see Cloudflare add support for Playwright with Browser Rendering. I’m attempting to use it on a project, but I’m running in to errors when attempting to deploy. As soon as I include the “@Cloudflare/playwright” package in my build, deploys fail. My guess is that there could be something in that package that isn’t supported in the Workers run time?
✘ [ERROR] A request to the Cloudflare API (/accounts/4f453aab7846de127d0e18aec26d1576/workers/scripts/locum-jobs/versions) failed.

Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')
at null.<anonymous> (assets/app-YABV1Xlm.js:39099:31) in hasFlag
at null.<anonymous> (assets/app-YABV1Xlm.js:39115:7) in requireSupportsColors
at null.<anonymous> (assets/app-YABV1Xlm.js:39564:29)
at null.<anonymous> (assets/app-YABV1Xlm.js:39694:5) in requireColors
at null.<anonymous> (assets/app-YABV1Xlm.js:39702:19)
at null.<anonymous> (assets/app-YABV1Xlm.js:39704:5) in requireSafe
at null.<anonymous> (assets/app-YABV1Xlm.js:39707:19)
[code: 10021]
✘ [ERROR] A request to the Cloudflare API (/accounts/4f453aab7846de127d0e18aec26d1576/workers/scripts/locum-jobs/versions) failed.

Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')
at null.<anonymous> (assets/app-YABV1Xlm.js:39099:31) in hasFlag
at null.<anonymous> (assets/app-YABV1Xlm.js:39115:7) in requireSupportsColors
at null.<anonymous> (assets/app-YABV1Xlm.js:39564:29)
at null.<anonymous> (assets/app-YABV1Xlm.js:39694:5) in requireColors
at null.<anonymous> (assets/app-YABV1Xlm.js:39702:19)
at null.<anonymous> (assets/app-YABV1Xlm.js:39704:5) in requireSafe
at null.<anonymous> (assets/app-YABV1Xlm.js:39707:19)
[code: 10021]
2 Replies
darren
darrenOP2w ago
I'm using the nodejs_compat compatibility flag and 2025-03-05 for the compatibility date. I also have this for the browser binding.
[browser]
binding = "BROWSER"
[browser]
binding = "BROWSER"
Rui Figueira
Rui Figueira3d ago
Hi @darren which version are you using? Can you provide a minimal code example that reproduces the error?

Did you find this page helpful?