with cloudflare wrangler:Uncaught TypeError: globalThis.XMLHttpRequest is not a constructor
I'm using CF's Wrangler framework to develop an API, and when I plug in twitter-api-v2, yarn dev starts with an error message ` Uncaught TypeError: globalThis.XMLHttpRequest is not a constructor
at null.
I don't see this message in development but it fails when deploying to cloudflare due to the node.js API, I don't think this package is compatible with cloudflare.
Indeed, it's a compatibility issue between cloudflare workers and node.
See https://developers.cloudflare.com/workers/runtime-apis/nodejs/http/