aqeel-legalinc / angular2-json2csv

Angular Component to convert CSV from Json
9 stars 13 forks source link

csv.service.ts is not part of the compilation output. #13

Open cfficaurzua opened 6 years ago

cfficaurzua commented 6 years ago

I have the following error:

ERROR in ./node_modules/angular2-json2csv/src/csv.service.ts
Module build failed: Error: C:\Users\Cristobal\Desktop\dev\backstage2\node_modules\angular2-json2csv\src\csv.service.ts is not part of the compilation output. Please check the other error messages for details.
    at AngularCompilerPlugin.getCompiledFile (C:\Users\Cristobal\Desktop\dev\backstage2\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:648:23)
    at plugin.done.then (C:\Users\Cristobal\Desktop\dev\backstage2\node_modules\@ngtools\webpack\src\loader.js:467:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
 @ ./node_modules/angular2-json2csv/index.js 2:20-48
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts

webpack: Failed to compile.

I imported the module in app.module with import { CsvService} from "angular2-json2csv"; and added it to providers

angular/cli: 1.6.0, angular/compiler-cli: ^5.0.0, angular/core: ^5.0.0, angular2-json2csv: ^1.1.2,

tkstang commented 6 years ago

Same problem after attempting to update Angular, any luck with this?

tkstang commented 6 years ago

The problem is the ts files being included that the the library is not packaged properly it appears. Discussion of the reasons here https://github.com/angular/angular-cli/issues/8284

NathanialSopko commented 4 years ago

Same problem here.

"@angular/cli": "^8.3.20",
"@angular/common": "^8.2.14",
"@angular/compiler": "^8.2.14",
"angular2-json2csv": "^1.1.2"