Description
Bug when using AOT with Angular 5
Versions.
Yarn: 1.2.1
Angular CLI: 1.5.0-rc.1
Node: 8.4.0
OS: win32 x64
Angular: 5.0.0-rc.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
angular/cli: 1.5.0-rc.1
angular-devkit/build-optimizer: 0.0.28
angular-devkit/core: 0.0.20
angular-devkit/schematics: 0.0.34
ngtools/json-schema: 1.1.0
schematics/angular: 0.0.46
typescript: 2.4.2
webpack: 3.7.1
Repro steps.
- ng set --global packageManager=yarn
- ng new myApp
- update package.json to Angular 5
- ng serve --aot
The log given by the failure.
ERROR in ./src/main.ts
Module build failed: Error: TypeScript compilation failed.
at plugin.done.then (X:\ng15y\node_modules@angular\cli\node_modules@ngtools\webpack\src\loader.js:479:27)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
@ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
ERROR in ./src/polyfills.ts
Module build failed: Error: TypeScript compilation failed.
at plugin.done.then (X:\ng15y\node_modules@angular\cli\node_modules@ngtools\webpack\src\loader.js:479:27)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
@ multi ./src/polyfills.ts
ERROR in
Mention any other details that might be useful.
I use yarn 1.2.1 to install dependencies. I couldn't reproduce this error in empty project with npm 5, but after installing libraries material-beta.12, covalent-beta.8-1 and angulartics-2.4.0 the same problem also appears.
Reverting project to Angular 4.4.5 fixes this issue in both cases.