question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng serve --aot fail after file change

See original GitHub issue

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 https://github.com/angular/angular/pull/25335. Reverting @angular/compiler to 6.1.1 workaround for this. I tested without fix, it work as before.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:71
  • Comments:67 (9 by maintainers)

github_iconTop GitHub Comments

28reactions
alexeaglecommented, Aug 10, 2018

Added to the top of our backlog

16reactions
dkchvcommented, Aug 9, 2018

the same, v6.1.2 is broken. downgrade to "@angular/compiler-cli": "6.1.1",

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 7 : "ng serve --aot" fails the after a file change
What I found as a solution what an issue in the official Angular CLI repository. In my case the issue was caused by...
Read more >
Angular workspace configuration
The following properties, at the top-level of the file, configure the workspace. ... defaults and supplies extra serve defaults for the ng serve...
Read more >
The Ahead-of-Time (AOT) compiler - Angular - w3resource
Ahead-of-Time (AOT), which compiles your app at build time. JIT compilation is the default when you run the ng build (build only) or...
Read more >
What is AOT and JIT Compiler in Angular ? - GeeksforGeeks
After that AOT builds this into a war file to deploy directly by using Heroku or by JBoss or by ... Just add...
Read more >
Angular Ivy
To revert the compiler default, set the build option aot: false in the angular.json configuration file. If you disable Ivy and the project...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found