Missing *.ts files (due to `npm link` ?)

So after reading this Github issue again: https://github.com/angular/angular-cli/issues/8284

I made this change in .angular-cli.json:

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

and now, given that preserveSymlinks flag and the include field in my tsconfig.app.json file:

 "include":[
    "./**/*.ts",
    "../node_modules/sce-plugins/**/*.ts"
  ],

I can now symlink 'sce-plugins' into my main project, instead of manually copying the files. It's possible that you won't need the "include" field at all, although I found that if I removed the "include" field, that it wouldn't work.


In Angular 6 "angular.json" file it's required to put "preserveSymlinks" under "options" Example:

"defaults": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "preserveSymlinks": true,
            "outputPath": "dist/ConsoleClient",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "src/tsconfig.app.json",
            "assets": [
              "src/favicon.ico",
              "src/assets",
              "src/web.config"
            ],

I was having the same issue while migrating my app from Angular 5 to 6, fix I have applied:

Added entry of missing file in includes array of tsconfig.app.json(ATTENTION: filename is not tsconfig.json)

Also, make sure that the path you missing file you mention is relative to the tsconfig.app.json