Skip to content

ng serve --aot fail after file change #11835

@WandererInVoids

Description

@WandererInVoids

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Angular CLI: 6.1.2
Node: 10.0.0
OS: win32 x64
Angular: 6.1.2
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker

Package Version

@angular-devkit/architect 0.7.2
@angular-devkit/build-angular 0.7.2
@angular-devkit/build-optimizer 0.7.2
@angular-devkit/build-webpack 0.7.2
@angular-devkit/core 0.7.2
@angular-devkit/schematics 0.7.2
@angular/cdk 6.4.3
@angular/material 6.4.3
@ngtools/webpack 6.1.2
@schematics/angular 0.7.2
@schematics/update 0.7.2
rxjs 6.2.2
typescript 2.9.2
webpack 4.9.2
-->

Repro steps

  1. run ng serve with aot flag
  2. change something in watch filles
  3. see error in module find(file that change)

The log given by the failure

Module not found: Error: Can't resolve '@angular/material/button.ngfactory' in 'D:\Flare\flare.ui2\src\homeapp\app\components\reports\profitAndLoss'
ERROR in ./src/homeapp/app/components/reports/profitAndLoss/profit.and.loss.ngfactory.js
Module not found: Error: Can't resolve '@angular/material/checkbox.ngfactory' in 'D:\Flare\flare.ui2\src\homeapp\app\components\reports\profitAndLoss'
ERROR in ./src/homeapp/app/components/reports/profitAndLoss/profit.and.loss.ngfactory.js
Module not found: Error: Can't resolve '@angular/material/form-field.ngfactory' in '.\src\homeapp\app\components\reports\profitAndLoss'
ERROR in ./src/homeapp/app/components/reports/profitAndLoss/profit.and.loss.ngfactory.js
Module not found: Error: Can't resolve '@angular/material/menu.ngfactory' in '.\src\homeapp\app\components\reports\profitAndLoss'

Date: 2018-08-09T17:57:03.581Z - Hash: 12b8572033feade48d1a - Time: 34472ms
4 unchanged chunks
chunk {main} main.js (main) 16.2 MB [initial] [rendered]

i 「wdm」: Failed to compile.

Desired functionality

work as before update

Mention any other details that might be useful

I didn't know where to write, in @angular/compile or here but error showed in cli, so...
This breaking from this fix angular/angular#25335.
Reverting @angular/compiler to 6.1.1 workaround for this.
I tested without fix, it work as before.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions