I've been working with polymer in dart for quite some time now. Recently I went to run a long-running project and had issues with my build.dart file. After having no luck stripping it down to bare bones, I started a new "Sample web application using the polymer library [mobile friendly]" (the default clickcounter example), and before any modifications, I still get the following unhandled exception: build.dart returned error code 255
Unhandled exception:
No top-level getter 'path.Style' declared.
NoSuchMethodError: method not found: 'path.Style'
Receiver: top-level
Arguments: [...]
#0 NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:168)
#1 systemToAssetPath (package:polymer/src/build/common.dart:219:7)
#2 MappedListIterable.elementAt (dart:_internal/iterable.dart:397)
#3 ListIterable.toList (dart:_internal/iterable.dart:214)
#4 TransformOptions.TransformOptions (package:polymer/src/build/common.dart:101:54)
#5 lint (package:polymer/builder.dart:148:27)
#6 build (package:polymer/builder.dart:122:13)
#7 main (file:///home/dom/Development/dart/click_counter/build.dart:4:8)
#8 _startIsolate.isolateStartHandler (dart:isolate-patch/isolate_patch.dart:212)
#9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:122)
My (unmodified) build.dart file is as follows: import 'package:polymer/builder.dart';
main(args) {
build(entryPoints: ['web/click_counter.html'],
options: parseOptions(args));
}
If I try and run it in dartium, I get the following:
Loading polymer/src/build/mirrors_remover, polymer/src/build/delete_file, polymer/src/build/remove_sourcemap_comment, observe and smoke/src/default_transformer transformers...
in ShutdownIsolate: Unhandled exception:
Uncaught Error: 'http://localhost:37071/packages/$pub/serialize/exception.dart': malformed type: line 46 pos 43: type 'Chain' is not loaded
'stack': stack == null ? null : new Chain.forTrace(stack).toString()
^
type error.
...
It then hangs on "Loading polymer transformers..."
I encounter a similar issue when running the unmodified "ToDoMVC" example from the welcome page, though the error on run is 'path.prettyUri' NoSuchMethodError.
I've tried it with a number of versions of polymer (0.13.1, 0.13.0+3, 0.12.2+1, 0.12.0+1, 0.10.0). I'm using Dart Editor and SDK 1.6.0.
I'm not a particularly advanced user, so haven't intentionally dug around anywhere scary.
Thanks in advance.
pub cache repairmaybe some package directory is damaged. - Günter Zöchbauer