angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

AoT Freezes

Open Richard87 opened this issue 10 years ago • 31 comments

ng serve --aot freezes after compiling 85 modules.

OS?

Windows 10 (Rinning with Admin priviliges)

Versions.

ng --version angular-cli: 1.0.0-beta.16 node: 6.3.0 os: win32 x64

Repro steps.

started with RC4 (created with angular-cli) and upgraded to final (2.0.1)

The log given by the failure.

Freezes: ng serve --aot ** NG Live Development Server is running on http://localhost:4200. ** 20% building modules 85/85 modules 0 active

Richard87 avatar Oct 05 '16 03:10 Richard87

@naveedahmed1 Unfortunately, I don't know if there's a difference. I'm on the webpack cli. On the aot and lazy loading issue, check #2735 for updates.

FoodBuster avatar Oct 28 '16 02:10 FoodBuster

@FoodBuster thanks for pointing that out. I was banging my head why I couldn't get it to work. @team please be more descriptive in error messages.

mwawrusch avatar Oct 30 '16 13:10 mwawrusch

@FoodBuster thx for the hint. This solves the problem with X Module is not a NgModule

elvirdolic avatar Nov 03 '16 12:11 elvirdolic

@elvirdolic I did not understand how you actually solved this issue. Can you explain?

unsafecode avatar Nov 10 '16 10:11 unsafecode

"Convert all routing files to ngModules. Previously, I had routing files that exported routes but didn't contain all the ngModule metadata."

this is what I have done.

elvirdolic avatar Nov 10 '16 11:11 elvirdolic

@elvirdolic Thanks. Unfortunately, I already have this coding style in place, but still getting trouble with AoT and lazy routes.

unsafecode avatar Nov 10 '16 11:11 unsafecode

lazy routes and AOT are not supported in the latest release. This task solves only the NgModule is not a module issue. We also wait for the next release to fix it. I will try with master today maybe I can provide some feedback.

2016-11-10 12:35 GMT+01:00 unsafecode [email protected]:

@elvirdolic https://github.com/elvirdolic Thanks. Unfortunately, I already have this coding style in place, but still getting trouble with AoT and lazy routes.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/2515#issuecomment-259668412, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ8j8iWis09mL0UJnAOT5_n5xRAE_Zunks5q8wGMgaJpZM4KOZdb .

elvirdolic avatar Nov 10 '16 11:11 elvirdolic

@elvirdolic In the end I managed to solve this issue as well, but as you said, lazy routes and AoT simply don't play together. I also tried out the master branch, but much like the hidden @ngtools/[email protected] version of npm, it breaks due to the done promise being uninitialized.

unsafecode avatar Nov 10 '16 14:11 unsafecode

For me, ng build --aot freezes in ubuntu but working perfectly in MacOS. Seems like OS specific issue.

aggarwalankush avatar Dec 09 '16 19:12 aggarwalankush

Closing this, it's been fixed a while ago.

hansl avatar Mar 23 '17 23:03 hansl

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.