Skip to content

ng serve --aot keeps invalidating & rebuilding bundle infinitely #2560

Closed
@Meligy

Description

@Meligy

Please provide us with the following information:

OS?

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

Windows 8.1 x64

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: 4.4.2
os: win32 x64

Repro steps.

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

Created using CLI and --routing flag, and also style=scss.

ng new some-project --style=scss --routing

The problem happens when running:

ng serve --aot

(works fine without --aot)

The log given by the failure.

Normally this include a stack trace and some more information.

webpack: bundle is now VALID.
webpack: bundle is now INVALID.

The build keeps showing webpack: bundle is now INVALID. after it finishes, and then rebuilds the bundle again, and so on and so on.

Mention any other details that might be useful.

I think the core problem is that the Angular CLI is monitoring dist for changes. There was another issue #2502 about how uploading files to dist/assets/ was causing an app rebuild. Maybe both issues are duplicates of #2425, although I'm not 100% sure.

In this case, I suspect changes to dist/ngfactory are causing the rewrite, although I'm not sure why directly writing to dist for the other files works normally, because ng serve without --aot is still working fine, only updating when there's a real change (I didn't test making changes in dist itself though, this might be still broken).


Thanks! We'll be in touch soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions