title: ERROR in AppModule is not an NgModule, typescript 2.3.2, Angular 4
body: <p>I recently upgraded to node 6, angular 4, typescript 2.3.2 and @angular/cli 1.02. I followed the <a href="https://github.com/angular/angular-cli/wiki/stories-1.0-update" rel="nofollow noreferrer" title="guide">Guide</a> on how to upgrade @angular/cli.
  I'll add my whole package.json down below if there's anything relevant there.
  And I get this error:</p>
  
  <pre><code>ERROR in AppModule is not an NgModule
  ERROR in ./src/main.ts
  Module build failed: TypeError: Cannot read property 'newLine' of undefined
  at Object.getNewLineCharacter (C:\development\projects-git\mydoc\static-    web\node_modules\typescript\lib\typescript.js:9580:20)
  at Object.createCompilerHost (C:\development\projects-git\mydoc\static-web\node_modules\typescript\lib\typescript.js:66674:26)
  at Object.ngcLoader (C:\development\projects-git\mydoc\static-web\node_modules\@ngtools\webpack\src\loader.js:202:31)
   @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
  </code></pre>
  
  <p>in the guide I had to update my <code>main.ts</code> to this:</p>
  
  <pre><code>import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  import { enableProdMode } from '@angular/core';
  import { environment } from './environments/environment';
  import { AppModule } from './app/app.module';
  
  if (environment.production) {
    enableProdMode();
  }
  
  platformBrowserDynamic().bootstrapModule(AppModule);
  </code></pre>
  
  <p>My full <code>package.json</code> is this:</p>
  
  <pre><code>{
    "name": "angular2-app",
    "version": "0.0.0",
    "license": "MIT",
    "angular-cli": {},
    "scripts": {
      "ng": "ng",
      "start": "ng serve",
      "build": "ng build",
      "test": "ng test",
      "lint": "ng lint",
      "e2e": "ng e2e"
    },
    "private": true,
    "dependencies": {
      "@angular/animations": "^4.1.1",
      "@angular/common": "^4.1.1",
      "@angular/compiler": "^4.1.2",
      "@angular/core": "^4.1.2",
      "@angular/forms": "^4.1.1",
      "@angular/http": "^4.1.2",
      "@angular/platform-browser": "^4.1.1",
      "@angular/platform-browser-dynamic": "^4.1.1",
      "@angular/platform-server": "^4.1.1",
      "@angular/router": "^4.1.1",
      "@ngtools/json-schema": "1.0.0",
      "@ngtools/webpack": "1.2.3",
      "@types/file-saver": "0.0.0",
      "angular2-datatable": "^0.5.3",
      "bootstrap-sass": "^3.3.7",
      "core-js": "^2.4.1",
      "file-saver": "^1.3.3",
      "font-awesome": "^4.7.0",
      "moment": "^2.18.1",
      "mydatepicker": "^1.9.1",
      "ng2-bootstrap": "^1.6.1",
      "ng2-page-scroll": "^4.0.0-beta.5",
      "@ngx-translate/core": "^6.0.0",
      "rxjs": "^5.4.0",
      "string-to-json": "^0.1.0",
      "zone.js": "^0.8.4"
    },
    "devDependencies": {
      "@angular/cli": "^1.0.2",
      "@angular/compiler": "^4.1.2",
      "@angular/compiler-cli": "^4.0.0",
      "@types/jasmine": "2.5.38",
      "@types/node": "^6.0.42",
      "codelyzer": "~2.0.0",
      "extract-text-webpack-plugin": "^2.0.0-rc.0",
      "jasmine-core": "~2.5.2",
      "jasmine-spec-reporter": "~3.2.0",
      "karma": "~1.4.1",
      "karma-chrome-launcher": "~2.0.0",
      "karma-cli": "^1.0.1",
      "karma-coverage-istanbul-reporter": "^0.2.0",
      "karma-jasmine": "~1.1.0",
      "karma-jasmine-html-reporter": "^0.2.2",
      "karma-junit-reporter": "^1.2.0",
      "karma-phantomjs-launcher-nonet": "0.1.3",
      "protractor": "~5.1.0",
      "ts-node": "~2.0.0",
      "tslint": "~4.5.0",
      "typescript": "2.3.2"
    }
  }
  </code></pre>
  
  <p>This makes it immpossible to build.</p>