zemirco / json2csv

Convert json to csv with column titles
http://zemirco.github.io/json2csv
MIT License
2.72k stars 363 forks source link

Can't use with angular 5 #279

Closed sivahanuman closed 6 years ago

sivahanuman commented 6 years ago

Issue: I install this package with npm install and i add the code in my angular component, i am getting error Cannot find name 'require'

` ERROR in ./node_modules/angular2-json2csv/src/csv.service.ts Module build failed: Error: \node_modules\angular2-json2csv\src\csv.service.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).

`

i am using vscode, angular 5 on windows 10 64 bit machine

juanjoDiaz commented 6 years ago

That issue has nothing to do with json2csv. It's an issue of the angular wrapper and was already reported in https://github.com/aqeel-legalinc/angular2-json2csv/issues/11

angular2-json2csv Look like hasn't been updated for quite a while, though.