checkout-sdk-node
checkout-sdk-node copied to clipboard
response.header.raw not a function (Vuejs. Webpack issue)
I've tried running the basic request:
const cko = new Checkout('sk_test...');
const payment = await cko.payments.get("pay_w6ktefehnck2zlguyvocdvuhry");
But this gave me:
API Error: API Error
at eval (webpack-internal:///./node_modules/checkout-sdk-node/dist/services/errors.js:289:18)
at Generator.next (<anonymous>)
at asyncGeneratorStep (webpack-internal:///./node_modules/checkout-sdk-node/dist/services/errors.js:8:103)
at _next (webpack-internal:///./node_modules/checkout-sdk-node/dist/services/errors.js:10:194)
with an error body of: "response.header.raw not a function"
My current setup
Quasar + Vuejs I also tried this on Nuxt.js. Got the same issue.
I also tried running it plainly as a simple nodejs script. That worked. But as soon as it runs in a vuejs framework it seems to break. And I suspect it might be some webpack nonsense with node-fetch perhaps.
Thanks!