I am at my whits end here. I've been trying over the last 48 hours to get these technologies to work.I've read everywhere that they should be able to work but it's just one problem after the other. I've tried various combinations of my pubspeck.yaml file but the results I get are either the code simply wont build, or it just doesn't work >.>
I'll appreciate any help I can get!
my pubspeck.yaml:
name: blah
dependencies:
angular: 0.12.0
angular_node_bind: any
shadow_dom: any
browser: any
polymer: ">=0.11.0 <0.12.0"
core_elements: ">=0.0.6 <0.1.0"
paper_elements: any
transformers:
- angular
- polymer:
entry_points:
- web/index.html
dependency_overrides:
polymer: ">= 0.11.1-dev < 0.12.0"
browser: any
web_components: 0.4.0
analyzer: ">=0.15.6 <0.16.0"
html5lib: ">=0.11.0 <0.12.0"
My dart file:
import 'package:polymer/polymer.dart';
import 'package:angular/angular.dart';
import 'package:angular/application_factory.dart';
import 'package:angular_node_bind/angular_node_bind.dart';
// HACK until we fix code gen size. This doesn't really fix it,
// just makes it better.
@MirrorsUsed(override: '*')
import 'dart:mirrors';
void main() {
initPolymer().run(() {
applicationFactory().addModule(new AppModule()).addMdoule(new NodeBindModule()).run();
});
}
with my the following as is, Dart2js gives me the following output:
With the pubspeck.yaml I get the following output:
Loading source assets...
Loading smoke/src/default_transformer transformers...
Loading di transformers... (1.7s)
Loading observe transformers...
Loading angular transformers...
Loading polymer/src/build/mirrors_remover transformers...
Loading polymer transformers...
Loading polymer transformers...
Loading polymer transformers... (1.0s)
Building gthr-web... (14.1s)
[Info from Dart2JS]:
Compiling gthr-web|web/Application_static_expressions.dart...
[Error from Dart2JS]:
web/Application_static_expressions.dart:1:13:
Expected ';', but got '-'.
library gthr-web.web.Application.generated_expressions;
^
[Info from Dart2JS]:
Took 0:00:00.519007 to compile gthr-web|web/Application_static_expressions.dart.
[Info from Dart2JS]:
Compiling gthr-web|web/Application.dart...
[Error from Dart2JS on gthr-web|web/Application.dart]:
web/Application_static_expressions.dart:1:13:
Expected ';', but got '-'.
library gthr-web.web.Application.generated_expressions;
^
[Info from Dart2JS]:
Took 0:00:00.591015 to compile gthr-web|web/Application.dart.
[Info from Dart2JS]:
Compiling gthr-web|web/Application_static_injector.dart...
[Error from Dart2JS]:
web/Application_static_injector.dart:1:13:
Expected ';', but got '-'.
library gthr-web.web.Application.generated_static_injector;
^
[Info from Dart2JS]:
Took 0:00:00.501912 to compile gthr-web|web/Application_static_injector.dart.
[Info from Dart2JS]:
Compiling gthr-web|web/Application_static_metadata.dart...
[Error from Dart2JS]:
web/Application_static_metadata.dart:1:13:
Expected ';', but got '-'.
library gthr-web.web.Application.generated_metadata;
^
[Info from Dart2JS]:
Took 0:00:00.151240 to compile gthr-web|web/Application_static_metadata.dart.
[Info from Dart2JS]:
Compiling gthr-web|web/index.html_bootstrap.dart...
[Error from Dart2JS on gthr-web|web/index.html_bootstrap.dart]:
web/Application_static_expressions.dart:1:13:
Expected ';', but got '-'.
library gthr-web.web.Application.generated_expressions;
^
[Info from Dart2JS]:
Took 0:00:00.916099 to compile gthr-web|web/index.html_bootstrap.dart.
Build failed.
解决方案
I just started to look at your code (maybe I find more hints/suggestions/problems)
You should try to change
polymer: ">=0.11.1-dev <0.12.0"
to
polymer: ">=0.12.0-dev <0.12.0"
This pre-release version of the Polymer package contains some paper-elements related bug-fixes.
It seems you are using a - (dash) in a library identifier where this character is invalid. You also shouldn't use a dash in Dart file names and all-lowercase characters.