#Http2.Request is not a function

7 messages · Page 1 of 1 (latest)

upper violet
#

Is Http2 not supported in the workers runtime? I'm not familiar with http2 - this is coming from a library I'm using.

rigid cairn
#

What is the full error? I believe workers only supports node-fetch which is HTTP/1.1

upper violet
#

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)
rigid cairn
#

Yeah not sure what that means seems like the http2.request is being used wrong

upper violet
#

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.

rigid cairn
#

Just googled it and are you using the web-worker bundle? Looking at old issues it seems that is the recommened one for Workers

upper violet
#

I tried that and it seems to only work in a browser. Complains about window not being found.