Dart VM version: 2.0.0-dev.53.0 (Thu May 3 12:35:47 2018 +0200) on "macos_x64"
NoSuchMethodError: Class 'CompilerFlags' has no instance getter 'useNewPreserveWhitespace'.
Receiver: Instance of 'CompilerFlags'
Tried calling: useNewPreserveWhitespace
Run on Webstorm and cmdline same error.
Thank you for taking the time to file an issue!
In order to route, prioritize, and act on this as soon as possible please include:
dart --version)4.0.0, 5.0.0-alpha+5, MASTER)Missing some or all of the above might make the issue take longer or be impossible to act on.
For questions consider using Stack Overflow instead:
https://stackoverflow.com/questions/tagged/angular-dart
Also consider our Gitter channel for light-weight/quick discussions:
https://gitter.im/dart-lang/angular
Current version is 5.0.0-alpha+12. Could you try with that version?
Perhaps you need to limit the angular_compiler version to an older version.
@deaitch Are you use angular_components package?
I'm having this error, and I am using the angular components package, version 0.9.0-alpha+11.
I constrained angular_compiler to 0.4.0-alpha+11 and now I can build again.
That is the right way to go atm, and it is what we've done for the stagehand templates. See https://github.com/dart-lang/stagehand/blob/2d142bda55c04735ea9bfd8fecae14690833da6f/templates/web-angular/pubspec.yaml#L24:
dependency_overrides:
# Needed to ensure 0.4.0-alpha+12 (or greater) is not accessed
# https://github.com/dart-lang/stagehand/issues/506
angular_compiler: 0.4.0-alpha+11
FYI I just pushed a PR for an updated angular_components release.
https://github.com/dart-lang/angular_components/pull/265
I published angular_components v0.9.0-alpha+12 that should allow the version solve to get the newest version of angular that works with angular_compiler v0.4.0-alpha+12
@nshahan appears to be the solution.Thank you and closing issue.