#Http2.Request is not a function
7 messages · Page 1 of 1 (latest)
What is the full error? I believe workers only supports node-fetch which is HTTP/1.1
Nothing much more helpful:
Error in worker TypeError: Http2.Request is not a function
at Http2.doUri (worker.js:2501:17)
at tryAHost (worker.js:2484:19)
at Http2.do (worker.js:2498:11)
at Http2.<computed> [as post] (worker.js:2448:24)
Yeah not sure what that means seems like the http2.request is being used wrong
It's coming from a popular library ably that is not supporting ESM or the Cloudflare Worker environment. I've been using parts of it successfuly in Cloudflare Workers, but I just started using a new API and it's giving them this error. Not 100% surprising.
Just googled it and are you using the web-worker bundle? Looking at old issues it seems that is the recommened one for Workers
I tried that and it seems to only work in a browser. Complains about window not being found.