title: Angular Upgrade From 5 to 6: asset path must start with the project source root
body: <p>I upgraded my existing app from Angular 5 to 6. </p>
  
  <p>After i run <code>ng serve</code> i get the following error:</p>
  
  <blockquote>
    <p>The node_modules/font-awesome/fonts asset path must start with the
    project source root. Error: The node_modules/font-awesome/fonts asset
    path must start with the project source root.
        at assetPatterns.map.assetPattern (/home/kay/Documents/&lt;>/&lt;>/node_modules/@angular-devkit/build-angular/src/utils/normalize-asset-patterns.js:37:23)</p>
  </blockquote>
  
  <p>As you can see below i have an assets array that pulls in fonts from the node module package. This was not an issue in Angular 5.</p>
  
  <p><strong>angular.json</strong></p>
  
  <pre><code>{
    "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
    "version": 1,
    "newProjectRoot": "projects",
    "projects": {
      "demo": {
        "root": "",
        "sourceRoot": "src",
        "projectType": "application",
        "architect": {
          "build": {
            "builder": "@angular-devkit/build-angular:browser",
            "options": {
              "outputPath": "dist",
              "index": "src/index.html",
              "main": "src/main.ts",
              "tsConfig": "src/tsconfig.app.json",
              "polyfills": "src/polyfills.ts",
              "assets": [
                "src/assets",
                "src/favicon.ico",
                "../node_modules/font-awesome/fonts"
              ],
              "styles": [
                "src/styles.scss",
                "src/theme.scss",
                "node_modules/font-awesome/css/font-awesome.min.css"
              ],
              "scripts": [
                "node_modules/hammerjs/hammer.min.js",
                "node_modules/auth0-js/build/auth0.min.js",
                "node_modules/moment/min/moment.min.js",
                "node_modules/ua-parser-js/dist/ua-parser.min.js",
                "node_modules/d3/dist/d3.min.js",
                "node_modules/wordcloud/src/wordcloud2.js",
                "node_modules/chart.js/dist/Chart.bundle.min.js",
                "node_modules/progressbar.js/dist/progressbar.min.js"
              ]
            },
            "configurations": {
              "production": {
                "optimization": true,
                "outputHashing": "all",
                "sourceMap": false,
                "extractCss": true,
                "namedChunks": false,
                "aot": true,
                "extractLicenses": true,
                "vendorChunk": false,
                "buildOptimizer": true,
                "fileReplacements": [
                  {
                    "replace": "src/environments/environment.ts",
                    "with": "src/environments/environment.prod.ts"
                  }
                ]
              }
            }
          },
          "serve": {
            "builder": "@angular-devkit/build-angular:dev-server",
            "options": {
              "browserTarget": "demo:build"
            },
            "configurations": {
              "production": {
                "browserTarget": "demo:build:production"
              }
            }
          },
          "extract-i18n": {
            "builder": "@angular-devkit/build-angular:extract-i18n",
            "options": {
              "browserTarget": "demo:build"
            }
          },
          "test": {
            "builder": "@angular-devkit/build-angular:karma",
            "options": {
              "main": "src/test.ts",
              "karmaConfig": "./karma.conf.js",
              "polyfills": "src/polyfills.ts",
              "tsConfig": "src/tsconfig.spec.json",
              "scripts": [
                "node_modules/hammerjs/hammer.min.js",
                "node_modules/auth0-js/build/auth0.min.js",
                "node_modules/moment/min/moment.min.js",
                "node_modules/ua-parser-js/dist/ua-parser.min.js",
                "node_modules/d3/dist/d3.min.js",
                "node_modules/wordcloud/src/wordcloud2.js",
                "node_modules/chart.js/dist/Chart.bundle.min.js",
                "node_modules/progressbar.js/dist/progressbar.min.js"
              ],
              "styles": [
                "src/styles.scss",
                "src/theme.scss",
                "node_modules/font-awesome/css/font-awesome.min.css"
              ],
              "assets": [
                "src/assets",
                "src/favicon.ico",
                "node_modules/font-awesome/fonts"
              ]
            }
          },
          "lint": {
            "builder": "@angular-devkit/build-angular:tslint",
            "options": {
              "tsConfig": [
                "src/tsconfig.app.json",
                "src/tsconfig.spec.json"
              ],
              "exclude": [
                "**/node_modules/**"
              ]
            }
          }
        }
      },
      "demo-e2e": {
        "root": "",
        "sourceRoot": "",
        "projectType": "application",
        "architect": {
          "e2e": {
            "builder": "@angular-devkit/build-angular:protractor",
            "options": {
              "protractorConfig": "./protractor.conf.js",
              "devServerTarget": "demo:serve"
            }
          },
          "lint": {
            "builder": "@angular-devkit/build-angular:tslint",
            "options": {
              "tsConfig": [
                "e2e/tsconfig.e2e.json"
              ],
              "exclude": [
                "**/node_modules/**"
              ]
            }
          }
        }
      }
    },
    "defaultProject": "demo",
    "schematics": {
      "@schematics/angular:component": {
        "prefix": "app",
        "styleext": "scss"
      },
      "@schematics/angular:directive": {
        "prefix": "app"
      }
    }
  }
  </code></pre>