zerobounce / zero-bounce-javascript

1 stars 0 forks source link

TypeError: fetch failed #6

Open chr0m1ng opened 4 months ago

chr0m1ng commented 4 months ago

I'm running an express server in node.js with Node version v.18.13.0 and when I try to use this SDK I get the following error:

Error: TypeError: fetch failed
    at a (/Users/x/y/node_modules/@zerobounce/zero-bounce-sdk/dist/zeroBounceSDK.js:1:1292)
    at async /Users/x/y/dist/zero.js:9:26

I think you guys are missing a node-fetch import in your utils.js file when creating the request. If I simply add const fetch = require('node-fetch'); to zeroBounceSDK.js inside my node_modules file or add global.fetch = require('node-fetch') to my project file it starts to work.

vlungusst commented 3 months ago

Can you provide a minimal example project for this as we're unable to reproduce this?