@segmentio/send-json not being passed a timeout argument
texonidas opened this issue · 3 comments
While running segment locally in debug mode, I've run into an issue in lib/index.js on line 394. The send function being called (@segment/send-json) expects 5 arguments, (url, msg, headers, timeout, fn), however it is only being passed (url, msg, header, fn), and so I am getting constant "i is not a function" errors in my console.
I started seeing the same errors today as well
Issue is right here -
analytics.js-integrations/integrations/segmentio/lib/index.js
Lines 394 to 400 in a441a1f
As texonidas mentioned, we are missing a timeout as the fourth argument.
It looks like in this recent commit cf75105#diff-ec90774f0561687711e2f7e544859dfcb2d4900f482bc5eab32fc644159503e1, @segment/send-json was upgraded from v3 to v4.
The json() in v3 expects 4 arguments. The same function in v4 now expects 5 arguments.