I have freshly installed angular-cli 1.0.0.beta.17 (latest one), start new project, able to serve project on port 4200 with no problems - just standard \"app works!\" message.>
You must update latest version angular-cli, typescript. If you use command:
ng build --prod --aot=false
Your project compile JIT compilation and must be work if you use angular-cli.
if you want build with command
ng build --prod --aot=true
then it be AOT compilation and you must update main.ts file into:
import { enableProdMode } from '@angular/core';
import { platformBrowser } from '@angular/platform-browser';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowser().bootstrapModuleFactory(AppModule);