AOT compilation doesn't work with angular 2.2 in my project. (ng serve works ok without --aot option).
I can see an error: can't resolve module @angular/core/src/linker/view_utils from /home/...project/src/index.ts
I also tried to start a fresh new project with ng new. It doesn't work with angular 2.2 either (no errors, just freezing at 20% building modules 85/85 modules 0 active)
Ubuntu
angular-cli: 1.0.0-beta.19-3
node: 7.1.0/also tested on 7.0.0
os: linux x64
1.0.0-beta.19-3 is working with ~2.1.0 at the moment
2.2 has some breaking changes inside
From the Angular 2 blog:
Angular version 2.2.0 - is now available. This is a minor release following our announced adoption of Semantic Versioning, meaning that it contains no breaking changes and that it is be a drop-in replacement for 2.1.x.
at the moment 2.2 has some breaking changes inside
Semver is wrong, or the Angular Team is wrong, or we are missing something.
@hansl can you have a look?
ng-cli, ng2-bootstrap, etc. were using some internals of ng2, so now they are broken
Not all things required to make user experience smooth available in public API
Best way to make this issue resolved faster is to show some love to Hans :)
Best way to make this issue resolved faster is to show some love to Hans
:heart: @hansl
In defense of everyone involved: making hardly any changes at all, without making breaking changes accidentally, is a very difficult problem. Semantic versioning is a big improvement over arbitrary versioning, but the non-breaking change aspect is a goal, not something that magically happens.
please try angular-cli v1.0.0-beta.20-4
issue should be fixed
// cc @filipesilva
I can confirm, the issue is fixed! Thanks
@filipesilva What did you need to fix to get it working? So far everything looks fine in Universal, just curious so we can make sure it doesn't effect us as well.
I am running angular-cli v1.0.0-beta.20-4 and getting the mentioned error:
can't resolve module @angular/core/src/linker/view_utils from .../src/index.ts
Anybody any ideas?
You have to stick with 2.1.0 for now as Core made some underlying changes, but also you can use the workaround found here: and put it in both your client and server main files: https://github.com/MarkPieszak/aspnetcore-angular2-universal/blob/master/Client/__2.1.1.workaround.ts
Import that at the top of your client and node main files and you'll be able to use Core 2.2.1+ and higher.
@MarkPieszak I don't know exactly what was fixed, I wasn't very involved in it. Something just before the beta.20 release I believe, @hansl would know better.
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._
Most helpful comment
:heart: @hansl