Closed rianluoar closed 1 year ago
Just for testing purpose I removed (...args) from line 42 of TransformStream.js it started working as expected on my local system. @juanjoDiaz https://github.com/juanjoDiaz/json2csv/blob/main/packages/whatwg/src/TransformStream.js#L42
Hi @rianluoar ,
Yes. This is a known issue. Fixed in the upcoming typescript version that I've been trying to release since forever. I'll try to get it out asap.
I just released v7.0.0 which entirely rewrites @json2csv to typescript. This issue should be solved there.
Let me know if you find any other issues with it. This was a massive change.
json2-csv.service.ts:12 ERROR Error: Uncaught (in promise): TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'. TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'. at <computed> [as dispatchEvent] (TransformStream.js:42:51) at JSON2CSVWHATWGTransformStream.transformer.onHeader (TransformStream.js:45:47) at Transformer.pushHeader (StreamParser.js:128:12) at Transformer.pushLine (StreamParser.js:146:12) at Object.write (StreamParser.js:29:29) at Transformer.transform (TransformStream.js:25:20) at resolvePromise (zone.js:1193:31) at zone.js:1100:17 at zone.js:1116:33 at asyncGeneratorStep (asyncToGenerator.js:6:1) at _throw (asyncToGenerator.js:25:1) at _ZoneDelegate.invoke (zone.js:368:26) at Object.onInvoke (core.mjs:26117:33) at _ZoneDelegate.invoke (zone.js:367:52) at Zone.run (zone.js:127:43) at zone.js:1257:36