You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you read our Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect.
Description
I used flutterwave the way that was said is to be used on the getting started page but whenever i import it in another file containing my routes that cloudflare uses an error is thrown like so.
✘ [ERROR] service core:user:eccomerce-app: Uncaught TypeError: globalThis.XMLHttpRequest is not a constructor
at null.<anonymous> (index.js:8374:11) in checkTypeSupport
at null.<anonymous> (index.js:8397:38) in
node_modules/.pnpm/[email protected]/node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/capability.js
at null. (index.js:15:56) in __init
at null. (index.js:10577:5) in
node_modules/.pnpm/[email protected]/node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/request.js
at null. (index.js:15:56) in __init
at null. (index.js:10796:5) in node-modules-polyfills:http
at null. (index.js:15:56) in __init
at null. (index.js:10917:21) in
node-modules-polyfills-commonjs:http
at null. (index.js:18:50) in __require2
at null. (index.js:49449:16) in
node_modules/.pnpm/[email protected]/node_modules/request/request.js
Steps to Reproduce
Instantiate flutter wave like so:
const Flutterwave = require("flutterwave-node-v3")
export const flw = new Flutterwave(String(process.env.FLUTTERWAVE_PUBLIC_KEY), String(process.env.FLUTTERWAVE_SECRET_KEY));
import flw in the file you want to use flutterwave
Expected behaviour
No error is supposed to be thrown.
Actual behaviour
✘ [ERROR] service core:user:eccomerce-app: Uncaught TypeError: globalThis.XMLHttpRequest is not a constructor
at null.<anonymous> (index.js:8374:11) in checkTypeSupport
at null.<anonymous> (index.js:8397:38) in
node_modules/.pnpm/[email protected]/node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/capability.js
at null. (index.js:15:56) in __init
at null. (index.js:10577:5) in
node_modules/.pnpm/[email protected]/node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/request.js
at null. (index.js:15:56) in __init
at null. (index.js:10796:5) in node-modules-polyfills:http
at null. (index.js:15:56) in __init
at null. (index.js:10917:21) in
node-modules-polyfills-commonjs:http
at null. (index.js:18:50) in __require2
at null. (index.js:49449:16) in
node_modules/.pnpm/[email protected]/node_modules/request/request.js
Reproduces how often
everytime i use it
Configuration
API Version: v3
Environment: test mode
Browser:
Language: cloudflare-workers 3.77.0
Additional Information
To fix this replace axios with fetch
The text was updated successfully, but these errors were encountered:
Have you read our Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect.
Description
I used flutterwave the way that was said is to be used on the getting started page but whenever i import it in another file containing my routes that cloudflare uses an error is thrown like so.
✘ [ERROR] service core:user:eccomerce-app: Uncaught TypeError: globalThis.XMLHttpRequest is not a constructor
node_modules/.pnpm/[email protected]/node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/capability.js
at null. (index.js:15:56) in __init
at null. (index.js:10577:5) in
node_modules/.pnpm/[email protected]/node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/request.js
at null. (index.js:15:56) in __init
at null. (index.js:10796:5) in node-modules-polyfills:http
at null. (index.js:15:56) in __init
at null. (index.js:10917:21) in
node-modules-polyfills-commonjs:http
at null. (index.js:18:50) in __require2
at null. (index.js:49449:16) in
node_modules/.pnpm/[email protected]/node_modules/request/request.js
Steps to Reproduce
const Flutterwave = require("flutterwave-node-v3")
export const flw = new Flutterwave(String(process.env.FLUTTERWAVE_PUBLIC_KEY), String(process.env.FLUTTERWAVE_SECRET_KEY));
Expected behaviour
No error is supposed to be thrown.
Actual behaviour
✘ [ERROR] service core:user:eccomerce-app: Uncaught TypeError: globalThis.XMLHttpRequest is not a constructor
node_modules/.pnpm/[email protected]/node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/capability.js
at null. (index.js:15:56) in __init
at null. (index.js:10577:5) in
node_modules/.pnpm/[email protected]/node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/request.js
at null. (index.js:15:56) in __init
at null. (index.js:10796:5) in node-modules-polyfills:http
at null. (index.js:15:56) in __init
at null. (index.js:10917:21) in
node-modules-polyfills-commonjs:http
at null. (index.js:18:50) in __require2
at null. (index.js:49449:16) in
node_modules/.pnpm/[email protected]/node_modules/request/request.js
Reproduces how often
everytime i use it
Configuration
Additional Information
To fix this replace axios with fetch
The text was updated successfully, but these errors were encountered: