After update Dart SDK to 2.0.0-dev.62.0 version, I can’t compile correctly my AngularDart project. In order to have a common start point, I’m working on the _angular-examples/quickstart_ GitHub project, that you can find here.
Some project infos:
2.0.0-dev.56.05.0.0-alpha+14First time I compile with webdev serve, the compilation doesn’t have any problem, but, when I open the browser at http://localhost:8080 page it remains on “Loading...”. On the 2nd or 3rd time I compile, I receive these messages:
[INFO] Starting Build
[INFO] Updating asset graph completed, took 1ms
[SEVERE] angular on lib/app_component.dart:
Unhandled exception in the AngularDart compiler!
Please report a bug: https://github.com/dart-lang/angular/issues/new
NoSuchMethodError: Class 'List<ConstructorElement>' has no instance method 'retype'.
Receiver: Instance(length:1) of '_GrowableList'
Tried calling: retype()
[INFO] Running build completed, took 8.7s
[INFO] Caching finalized dependency graph completed, took 98ms
[INFO] Succeeded after 8.8s with 3 outputs (5 actions)
The app keeps running, but always with “Loading...”.
1. Do you have the same problem?
2. How can I resolve this problem?
Thanks!
Marco.
This was fixed in https://github.com/dart-lang/angular/commit/7a6ad112c01fe9993408b5f2a7b7b474f21b674d, which should be released next week.
Unfortunately, the SDK removed the retype method before we had a chance to clean up our codebase.
Until we publish the next release, you can always downgrade the SDK.
Thanks!
I’m waiting for the resolution of the problem. Hoping it will happen soon, while it is still not solved, how can I do the downgrade of Dart SDK?
For Windows, see: https://chocolatey.org/packages/dart-sdk/2.0.0.61-dev-0
@Marco87Developer We released 5.0.0-alpha+15 to fix this.
@chalin Thank you!
@alorenzen Great! Thanks! Now I can work with these:
environment:
sdk: '>=2.0.0-dev.63.0 <2.0.0'
dependencies:
angular: ^5.0.0-alpha+15
dev_dependencies:
angular_test: ^2.0.0-alpha+13
build_runner: ^0.8.10
build_test: ^0.10.2+4
build_web_compilers: ^0.4.0+4
test: ^0.12.42
@alorenzen, is the next release out for this fix?
@zyzbroker This was fixed in 5.0.0-alpha+15.
Most helpful comment
@Marco87Developer We released 5.0.0-alpha+15 to fix this.