Recently I have been upgrading my projects from Angular 5 to 6. After following the upgrade advice from the Angular Update site, I found that while the project would build, compile, deploy, and lint I could not add new components to my projects. I followed a number of StackExchange and Github articles and found that using the most recent version of Angular 6.0.8. This article had my solution. 

In testing, you can also try to add a component with the following command.

 ng generate component test2 --project {{projectName}}

In summary, my solution was I has to delete the following snippet from my angular.json file. 

 

"angular-e2e": {
  "root": "",
  "sourceRoot": "e2e",
  "projectType": "application",
  "architect": {
    "e2e": {
      "builder": "@angular-devkit/build-angular:protractor",
      "options": {
      "protractorConfig": "./protractor.conf.js",
      "devServerTarget": "angular:serve"
    }
  },
    "lint": {
      "builder": "@angular-devkit/build-angular:tslint",
      "options": {
        "tsConfig": [
          "e2e/tsconfig.e2e.json"
        ],
        "exclude": [
          "**/node_modules/**"
        ]
      }
    }
  }
}

Assuming your project is named angular this may be a quick fix. If your project is named something other than angular then you will need to look for your project name - e2e section.