Closed michelliebel closed 1 year ago
Hi @michelliebel,
A few things have changed. The library broke into modules in v6 and moved to Typescript since v7.
Also since v6 AsyncParser
API changed a bit.
It's weird that your build system is trying to build @json2csv when it's already prebuilt and includes typings. So you definitely shouldn't be rebuilding it.
Your issue seems related to your Angular version and your Typescript version based on a few public issues that I found:
Also, if you are using this on the frontend, I recommend that you use the whatwg module and the standard fetch
so you don't need to polyfill stream
or http
/https
. Or even the plainjs module.
I have been using the old version of json2csv, and am updating to the new @json2csv/node version for the AsyncStream. After installing one or more of the components (@json2csv/plainjs, @json2csv/node, @json2csv/formatters, etc), my application no longer builds successfully.
Errors in terminal:
My code:
package.json: "@json2csv/node": "7.0.1",
component.ts:
tsconfig.json updates to account for webpack changes:
angular.json edits to account for webpack changes:
Prior to updating to this new package, the app would build correctly. If I remove the package from the package.json, and run npm install, the app builds. So I am sure it is the package introducing the breaking change. What other config setup do I need for this package to not stop my app from building?
Angular ^12.2.16 Typescript 4.3.5
Thanks!