Search code examples
dartdart-mirrors

Program has stopped working. Breaking on exception: Class '_LocalLibraryMirror' has no instance getter 'classes'


This code does not work anymore.

String getHomePath() {
  var home = Platform.environment['HOME'];
  if(home != null) {
    return pathos.normalize(home);
  } else {
    return null;
  }
}
Breaking on exception: Class '_LocalLibraryMirror'
has no instance getter 'classes'.

Does this mean that the library "dart: mirrors" redesigned and the package "pathos" does not account for these changes?

Also, I'm surprised that package "pathos" uses "dart: mirrors" to determine in which environment it used (browser or standalone).


Solution

  • Here is the same problem mentioned https://github.com/angular/angular.dart/pull/408

    Update to 1.1.0-dev.5.6 solved it for them.

    You could check with pub upgrade if there is any updated package version that is not pulled due to version constraints and use dependency_overrides to force the newest package version.