title: angular6 not working locally after sever side render setup
body: <p>After successfully setting up the server side rendering in angular6, It's building and running as SSR, then the application stop working as a basic app, basically I would like to run my angular6 app as <code>npm run start</code>, however, when I ran this command I got this error and seems no documentation related.</p>
  
  <p>The app builds and serve as server-side rendering, but not as a regular app.</p>
  
  <p>This is the error I get:</p>
  
  <blockquote>
    <p>ITWS08:A6-Test-3-SSR CC$ npm run start
       angular@6.0.0 start /eclipse/A6-Test-3-SSR
       ng serve</p>
    
    <p>Could not determine a single project for the 'serve' target.
      Error: Could not determine a single project for the 'serve' target.
       at ServeCommand.getProjectNamesByTarget (/eclipse/A6-Test-3-SSR/node_modules/@angular/cli/models/architect-command.js:175:19)
                          at MergeMapSubscriber._loadWorkspaceAndArchitect.pipe.operators_1.concatMap
    [as project]
    (/eclipse/A6-Test-3-SSR/node_modules/@angular/cli/models/architect-command.js:50:43)
                          at MergeMapSubscriber._tryNext (/eclipse/A6-Test-3-SSR/node_modules/rxjs/internal/operators/mergeMap.js:122:27)
                          at MergeMapSubscriber._next (/eclipse/A6-Test-3-SSR/node_modules/rxjs/internal/operators/mergeMap.js:112:18)
                          at MergeMapSubscriber.Subscriber.next (/eclipse/A6-Test-3-SSR/node_modules/rxjs/internal/Subscriber.js:103:18)
                          at TapSubscriber._next (/eclipse/A6-Test-3-SSR/node_modules/rxjs/internal/operators/tap.js:109:26)
                          at TapSubscriber.Subscriber.next (/eclipse/A6-Test-3-SSR/node_modules/rxjs/internal/Subscriber.js:103:18)
                          at MergeMapSubscriber.notifyNext (/eclipse/A6-Test-3-SSR/node_modules/rxjs/internal/operators/mergeMap.js:141:26)
                          at InnerSubscriber._next (/eclipse/A6-Test-3-SSR/node_modules/rxjs/internal/InnerSubscriber.js:30:21)
                          at InnerSubscriber.Subscriber.next (/eclipse/A6-Test-3->SSR/node_modules/rxjs/internal/Subscriber.js:103:18)</p>
    
    <p>npm ERR! code ELIFECYCLE npm ERR! errno 1
        npm ERR! angular@6.0.0 start: <code>ng serve</code>
        npm ERR! Exit status 1
        npm ERR!
        npm ERR! Failed at the angular@6.0.0 start script.    npm ERR! This is probably not a problem with npm. There is likely additional
    logging output above.</p>
    
    <p>npm ERR! A complete log of this run can be found in:
       npm ERR!     /Users/CC/.npm/_logs/2018-05-29T13_46_21_934Z-debug.log
    ITWS08:A6-Test-3-SSR CC$</p>
  </blockquote>
  
  <p>Those errors don't show up on the build as server-side rendering</p>
  
  <p>Any ideas?</p>
  
  <p>Seems a problem on the angular-cli.json??</p>
  
  <p>If I replace the angular-cli.json without server-side render configuration, the app works as normal but fail to build SSR</p>
  
  <pre><code>            {
                "$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
                "version": 1,
                "newProjectRoot": "projects",
                "projects": {
                  "angular.io-example": {
                    "root": "",
                    "projectType": "application",
                    "prefix": "app",
                    "architect": {
                      "build": {
                        "builder": "@angular-devkit/build-angular:browser",
                        "options": {
                          "outputPath": "dist",
                          "index": "src/index.html",
                          "main": "src/main.ts",
                          "polyfills": "src/polyfills.ts",
                          "tsConfig": "src/tsconfig.app.json",
                          "assets": [
                            {
                              "glob": "favicon.ico",
                              "input": "src",
                              "output": "/"
                            },
                            {
                              "glob": "**/*",
                              "input": "src/assets",
                              "output": "/assets"
                            }
                          ],
                          "styles": [
                            {"input": "node_modules/font-awesome/css/font-awesome.css"},
                            {"input": "src/assets/css/flag-icon.css"},
                            {"input": "src/assets/css/bootstrap.css"},
                            {"input": "src/assets/css/xmas.css"},
                            {"input": "src/assets/css/styles.css"},             
                            {"input": "src/assets/css/browser-specific.css"}
                          ],
                          "scripts": [
                            {"input": "node_modules/hammerjs/hammer.js"}
                          ]
                        },
                        "configurations": {
                          "production": {
                            "fileReplacements": [
                              {
                                "replace": "src/environments/environment.ts",
                                "with": "src/environments/environment.prod.ts"
                              }
                            ],
                            "optimization": true,
                            "outputHashing": "all",
                            "sourceMap": false,
                            "extractCss": true,
                            "namedChunks": false,
                            "aot": true,
                            "extractLicenses": true,
                            "vendorChunk": false,
                            "buildOptimizer": true
                          }
                        }
                      },
                      "serve": {
                        "builder": "@angular-devkit/build-angular:dev-server",
                        "options": {
                          "browserTarget": "angular.io-example:build"
                        },
                        "configurations": {
                          "production": {
                            "browserTarget": "angular.io-example:build:production"
                          }
                        }
                      },
                      "extract-i18n": {
                        "builder": "@angular-devkit/build-angular:extract-i18n",
                        "options": {
                          "browserTarget": "angular.io-example:build"
                        }
                      },
                      "test": {
                        "builder": "@angular-devkit/build-angular:karma",
                        "options": {
                          "main": "src/test.ts",
                          "polyfills": "src/polyfills.ts",
                          "tsConfig": "src/tsconfig.spec.json",
                          "karmaConfig": "src/karma.conf.js",
                          "styles": [
                            {
                              "input": "styles.css"
                            }
                          ],
                          "scripts": [],
                          "assets": [
                            {
                              "glob": "favicon.ico",
                              "input": "src/",
                              "output": "/"
                            },
                            {
                              "glob": "**/*",
                              "input": "src/assets",
                              "output": "/assets"
                            }
                          ]
                        }
                      },
                      "lint": {
                        "builder": "@angular-devkit/build-angular:tslint",
                        "options": {
                          "tsConfig": [
                            "src/tsconfig.app.json",
                            "src/tsconfig.spec.json"
                          ],
                          "exclude": [
                            "**/node_modules/**"
                          ]
                        }
                      }
                    }
                  }
                }
              }
  </code></pre>
  
  <p>changing the angular-cli.json to server-side configuration the SSR build perfect and serve as SSR perfect but doesn't works normal, I would like to know how do I make both worlds to work</p>
  
  <pre><code>            {
                "$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
                "version": 1,
                "newProjectRoot": "projects",
                "projects": {
                  "angular.io-example": {
                    "root": "",
                    "projectType": "application",
                    "prefix": "app",
                    "architect": {
                      "build": {
                        "builder": "@angular-devkit/build-angular:browser",
                        "options": {
                          "outputPath": "dist/browser",
                          "index": "src/index.html",
                          "main": "src/main.ts",
                          "polyfills": "src/polyfills.ts",
                          "tsConfig": "src/tsconfig.app.json",
                          "assets": [
                            {
                              "glob": "favicon.ico",
                              "input": "src",
                              "output": "/"
                            },
                            {
                              "glob": "**/*",
                              "input": "src/assets",
                              "output": "/assets"
                            }
                          ],
                          "styles": [
                            {"input": "node_modules/font-awesome/css/font-awesome.css"},
                            {"input": "src/assets/css/flag-icon.css"},
                            {"input": "src/assets/css/bootstrap.css"},
                            {"input": "src/assets/css/xmas.css"},
                            {"input": "src/assets/css/styles.css"},             
                            {"input": "src/assets/css/browser-specific.css"}
                          ],
                          "scripts": [
                            {"input": "node_modules/hammerjs/hammer.js"}
                          ]
                        },
                        "configurations": {
                          "production": {
                            "fileReplacements": [
                              {
                                "replace": "src/environments/environment.ts",
                                "with": "src/environments/environment.prod.ts"
                              }
                            ],
                            "optimization": true,
                            "outputHashing": "all",
                            "sourceMap": false,
                            "extractCss": true,
                            "namedChunks": false,
                            "aot": true,
                            "extractLicenses": true,
                            "vendorChunk": true,
                            "buildOptimizer": true
                          }
                        }
                      },
                      "server": {
                        "builder": "@angular-devkit/build-angular:server",
                        "options": {
                          "outputPath": "dist/server",
                          "main": "src/main.server.ts",
                          "tsConfig": "src/tsconfig.server.json"
                        }
                      },
                      "extract-i18n": {
                        "builder": "@angular-devkit/build-angular:extract-i18n",
                        "options": {
                          "browserTarget": "angular.server:build"
                        }
                      },
                      "test": {
                        "builder": "@angular-devkit/build-angular:karma",
                        "options": {
                          "main": "src/test.ts",
                          "polyfills": "src/polyfills.ts",
                          "tsConfig": "src/tsconfig.spec.json",
                          "karmaConfig": "src/karma.conf.js",
                          "styles": [
                            {
                              "input": "styles.css"
                            }
                          ],
                          "scripts": [],
                          "assets": [
                            {
                              "glob": "favicon.ico",
                              "input": "src/",
                              "output": "/"
                            },
                            {
                              "glob": "**/*",
                              "input": "src/assets",
                              "output": "/assets"
                            }
                          ]
                        }
                      },
                      "lint": {
                        "builder": "@angular-devkit/build-angular:tslint",
                        "options": {
                          "tsConfig": [
                            "src/tsconfig.app.json",
                            "src/tsconfig.spec.json"
                          ],
                          "exclude": [
                            "**/node_modules/**"
                          ]
                        }
                      }
                    }
                  }
                }
              }
  </code></pre>