tomas / needle

Nimble, streamable HTTP client for Node.js. With proxy, iconv, cookie, deflate & multipart support.

Home Page:https://www.npmjs.com/package/needle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work in Cloudflare Workers

vtempest opened this issue · comments

Gives error when included in cfw project


X [ERROR] service core:user:researcher: Uncaught TypeError: globalThis.XMLHttpRequest is not a constructor

    at null.<anonymous>
  (api.js:58727:11) in checkTypeSupport
    at null.<anonymous>
  (api.js:58750:38) in
  node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/capability.js

That's not caused by Needle (there's no use of XMLHttpRequest anywhere). Looks like an error in the rollup-plugin-node-polyfills package.