node-google-spreadsheet icon indicating copy to clipboard operation
node-google-spreadsheet copied to clipboard

Error trying to use in a Cloudflare Pages

Open HuyAms opened this issue 3 years ago • 10 comments

I deployed my app to Cloudflare page but got this error

TypeError: globalThis.XMLHttpRequest is not a constructor

I think it's because Cloudflare uses Fetch API instead of XMLHttpRequest. Is there any walkaround?

Thank you

HuyAms avatar Nov 22 '22 14:11 HuyAms

Probably not at the moment, but I’m working on a big update so I’ll see if there’s a way to make this work.

theoephraim avatar Nov 25 '22 16:11 theoephraim

so it looks like this is a problem because I am using axios under the hood. I'd need to rewrite things to use fetch instead. Definitely doable but will take some work.

theoephraim avatar Jun 26 '23 17:06 theoephraim

Would be highly appreciated :heart:

bram-pkg avatar Jul 17 '23 21:07 bram-pkg

I was able to update the node version Cloudflare is using to 16.7.0 and deploy successfully. Previously was on 12.2.0.

nicklenihan avatar Sep 22 '23 08:09 nicklenihan