zbd-node icon indicating copy to clipboard operation
zbd-node copied to clipboard

ReferenceError: fetch is not defined (node 16)

Open augustresende opened this issue 2 years ago • 0 comments

(REDACTED (local paths)/node_modules/@zbd/node/src/utils.ts:22 }) { ^ ReferenceError: fetch is not defined at postData (node_modules/@zbd/node/src/utils.ts:22:2) at u.d.createCharge (node_modules/@zbd/node/src/zbd.ts:51:28) REDACTED (local paths) at Generator.next ()

Node version v16.20.0

fetch is being called in utils.ts without importing node-fetch, and fetch is not globally available in v16 without the experimental (and maybe unsafe) flag --experimental-fetch

augustresende avatar Oct 05 '23 20:10 augustresende