countries-data icon indicating copy to clipboard operation
countries-data copied to clipboard

Angular 5.1 - node_modules/countries-data/index.ts is not part of the compilation output

Open johan-- opened this issue 8 years ago • 1 comments

Hi Dor,

I'm getting an error using this with Angular 5.1.0-beta.2 (in my own project and your countries-data-angular4 application):

ERROR in ./node_modules/countries-data/index.ts Module build failed: Error: /home/johan/sandbox/countries-data-angular4/node_modules/countries-data/index.ts is not part of the compilation output. Please check the other error messages for details.

Adding this to tsconfig.app.json did not solve the issue:

"include": [ "../node_modules/countries-data/index.ts" ]

Thanks

johan-- avatar Nov 29 '17 06:11 johan--

I had the same issue and i resolved it : env:

Angular CLI: 1.7.3
Node: 9.8.0
Angular: 5.2.9
@angular/cli: 1.7.3

Two steps:

in your file: tsconfig.app.json add this

    "include": [
        "./**/*.ts",
        "../node_modules/countries-data/**/*"
    ],

In your .angular-cli.json add this:

    "defaults": {
        "build": {
            "preserveSymlinks": true  // <-- this block
        },
        "styleExt": "scss",
        "component": {}
    }

good luck,,,

anouar99pac avatar Apr 13 '18 15:04 anouar99pac