Skip to content

Using ng serve with --aot option causes constant invalidating and rebuilding #2418

Closed
@jtsom

Description

@jtsom

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

MacOS Sierra

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.16
node: 6.7.0
os: darwin x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

ng serve --aot

Initially builds, then goes into a constant Webpack INVALID rebuild VALID INVALID rebuild cycle.

The log given by the failure.

Normally this include a stack trace and some more information.

** NG Live Development Server is running on http://localhost:4200. **
4109ms building modules                 1ms add01043ms c94ms asset31ms emittinggHash: 79f9768baa01f1f7cde4
Version: webpack 2.1.0-beta.22
Time: 6095ms
           Asset       Size  Chunks             Chunk Names
  main.bundle.js    1.82 MB    0, 2  [emitted]  main
styles.bundle.js    10.4 kB    1, 2  [emitted]  styles
       inline.js    5.53 kB       2  [emitted]  inline
        main.map    1.98 MB    0, 2  [emitted]  main
      styles.map    14.5 kB    1, 2  [emitted]  styles
      inline.map    5.59 kB       2  [emitted]  inline
      index.html  476 bytes          [emitted]
  assets/bb8.png    12.5 kB          [emitted]
Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  2.81 kB       0
Child src/app/app.component.html:
                                                                   Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/app.component.html  2.67 kB       0       <app-nav-bar></app-nav-bar>
    <h1>
      {{title}}
    </h1>

    <my-fader [isVisible]="isVisible">
      Hello there <img src="/assets/bb8.png">
    </my-fader>


    <button (click)="isVisible = !isVisible">Toggle</button>
Child src/app/nav-bar/nav-bar.component.html:
                                                                               Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/nav-bar/nav-bar.component.html  2.52 kB       0       <nav>
      <img src="/assets/bb8.png">navbar-component works!
    </nav>

Child src/app/fader/fader.component.html:
                                                                           Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/fader/fader.component.html  2.59 kB       0       <div [@visibilityChanged]="visibility" >
          <ng-content></ng-content>
          <p>Can you see me? I should fade in or out...</p>
    </div>
Child src/app/nav-bar/nav-bar.component.scss:
                                                                               Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/nav-bar/nav-bar.component.scss  2.45 kB       0
Child src/app/fader/fader.component.scss:
                                                                           Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/fader/fader.component.scss  2.45 kB       0
Child src/app/app.component.scss:
                                                                   Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/app.component.scss  2.67 kB       0       @import '../styles';

    h1 {
        background-color: $primary-color
    }
webpack: bundle is now VALID.
webpack: bundle is now INVALID.
480ms building modules                  3ms add0ms1ms ch54ms asset0ms emitting gHash: 79f9768baa01f1f7cde4
Version: webpack 2.1.0-beta.22
Time: 1194ms
           Asset     Size  Chunks       Chunk Names
  main.bundle.js  1.82 MB    0, 2       main
styles.bundle.js  10.4 kB    1, 2       styles
       inline.js  5.53 kB       2       inline
        main.map  1.98 MB    0, 2       main
      styles.map  14.5 kB    1, 2       styles
      inline.map  5.59 kB       2       inline
Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  2.81 kB       0
Child src/app/app.component.html:
                                                                   Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/app.component.html  2.67 kB       0       <app-nav-bar></app-nav-bar>
    <h1>
      {{title}}
    </h1>

    <my-fader [isVisible]="isVisible">
      Hello there <img src="/assets/bb8.png">
    </my-fader>


    <button (click)="isVisible = !isVisible">Toggle</button>
Child src/app/nav-bar/nav-bar.component.html:
                                                                               Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/nav-bar/nav-bar.component.html  2.52 kB       0       <nav>
      <img src="/assets/bb8.png">navbar-component works!
    </nav>

Child src/app/fader/fader.component.html:
                                                                           Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/fader/fader.component.html  2.59 kB       0       <div [@visibilityChanged]="visibility" >
          <ng-content></ng-content>
          <p>Can you see me? I should fade in or out...</p>
    </div>
Child src/app/app.component.scss:
                                                                   Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/app.component.scss  2.67 kB       0       @import '../styles';

    h1 {
        background-color: $primary-color
    }
Child src/app/nav-bar/nav-bar.component.scss:
                                                                               Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/nav-bar/nav-bar.component.scss  2.45 kB       0
Child src/app/fader/fader.component.scss:
                                                                           Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/fader/fader.component.scss  2.45 kB       0
webpack: bundle is now VALID.
webpack: bundle is now INVALID.
446ms building modules                  1ms add1ms0ms ch48ms asset1ms emitting gHash: 79f9768baa01f1f7cde4
Version: webpack 2.1.0-beta.22
Time: 1095ms
           Asset     Size  Chunks       Chunk Names
  main.bundle.js  1.82 MB    0, 2       main
styles.bundle.js  10.4 kB    1, 2       styles
       inline.js  5.53 kB       2       inline
        main.map  1.98 MB    0, 2       main
      styles.map  14.5 kB    1, 2       styles
      inline.map  5.59 kB       2       inline
Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  2.81 kB       0
Child src/app/app.component.html:
                                                                   Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/app.component.html  2.67 kB       0       <app-nav-bar></app-nav-bar>
    <h1>
      {{title}}
    </h1>

    <my-fader [isVisible]="isVisible">
      Hello there <img src="/assets/bb8.png">
    </my-fader>


    <button (click)="isVisible = !isVisible">Toggle</button>
Child src/app/nav-bar/nav-bar.component.html:
                                                                               Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/nav-bar/nav-bar.component.html  2.52 kB       0       <nav>
      <img src="/assets/bb8.png">navbar-component works!
    </nav>

Child src/app/fader/fader.component.html:
                                                                           Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/fader/fader.component.html  2.59 kB       0       <div [@visibilityChanged]="visibility" >
          <ng-content></ng-content>
          <p>Can you see me? I should fade in or out...</p>
    </div>
Child src/app/app.component.scss:
                                                                   Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/app.component.scss  2.67 kB       0       @import '../styles';

    h1 {
        background-color: $primary-color
    }
Child src/app/nav-bar/nav-bar.component.scss:
                                                                               Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/nav-bar/nav-bar.component.scss  2.45 kB       0
Child src/app/fader/fader.component.scss:
                                                                           Asset     Size  Chunks       Chunk Names
    /Users/John/Dev/Javascript/Angular/a2test/src/app/fader/fader.component.scss  2.45 kB       0
webpack: bundle is now VALID.
webpack: bundle is now INVALID.
 32% building modules 3/6 modules 3 active ...pp/fader/fader.component.ngfactory.ts

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions