Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Meligy opened this issue Oct 7, 2016 · 3 comments
Closed

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

Meligy opened this issue Oct 7, 2016 · 3 comments

Comments

@Meligy
Copy link
Contributor

Meligy commented Oct 7, 2016

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.

@Meligy Meligy changed the title ng watch --aot keeps invalidating & rebuilding bundle infinitely ng serve --aot keeps invalidating & rebuilding bundle infinitely Oct 7, 2016
@jtsom
Copy link
Contributor

jtsom commented Oct 7, 2016

Yup. Reported this over a week ago: #2418

@Meligy
Copy link
Contributor Author

Meligy commented Oct 7, 2016

@jtsom I'm closing this as duplicate now. Can you please renamed #2418 to something ng serve specific? I'd appreciate that, as it'll make it easier to search for later. Thanks.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants