dartium で問題なく動作する dart-polymer プロジェクトがあります。デバイス モード/レスポンシブ デザイン モードに変更すると、最初のタイプの複数のエラーがスローされます。そのうちのいくつかを削除しました。
Already have a Dart type associated with paper-material interop_support.js:72 registerDartTypeUpgrader
interop_support.js:72 Already have a Dart type associated with paper-ripple
...
interop_support.js:72 Already have a Dart type associated with iron-request
...
interop_support.js:72 Already have a Dart type associated with neon-animatable
...
interop_support.js:72 Already have a Dart type associated with slide-from-right-animation
...
interop_support.js:72 Already have a Dart type associated with google-map
interop_support.js:72 Already have a Dart type associated with array-selector
interop_support.js:72 Already have a Dart type associated with dom-bind
...
undefined:1 Exception: Uncaught Error: NotSupportedError: Failed to execute 'registerElement' on 'Document': Registration failed for type 'resultat-element'. A type with that name is already registered.
Stack Trace:
#0 JsObject._callMethod (dart:js:235)
#1 JsObject.callMethod (dart:js:225)
#2 PolymerRegister.initialize (package:polymer/src/common/polymer_register.dart:19:23)
#3 loadInitializers.<anonymous closure>.<anonymous closure> (package:initialize/src/static_loader.dart:46:42)
#4 _runInitQueue (package:initialize/initialize.dart:35:24)
#5 _runInitQueue.<anonymous closure> (package:initialize/initialize.dart:38:39)
#6 _RootZone.runUnary (dart:async/zone.dart:1155)
#7 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:484)
#8 _Future._propagateToListeners (dart:async/future_impl.dart:567)
#9 _Future._completeWithValue (dart:async/future_impl.dart:358)
#10 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:412)
#11 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#12 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#13 _handleMutation (dart:html:42316)
ここで、以前のバージョンの Polymer-Dart でも問題が発生していたことがわかります。
私の .yaml ファイルは次のようになっています
environment:
sdk: '>=1.0.0 <2.0.0'
dependencies:
web_components: '>=0.11.3 <0.13.0'
route_hierarchical: any
reflectable: ^0.3.1
sqljocky: any
dependency_overrides:
polymer:
git:
url: https://github.com/dart-lang/polymer-dart.git
ref: 1.0.0-rc.2
polymer_interop:
git:
url: https://github.com/dart-lang/polymer_interop.git
ref: 1.0.0-rc.1
polymer_elements:
git:
url: https://github.com/dart-lang/polymer_elements.git
ref: update
transformers:
- web_components:
entry_points:
- web/index.html
- reflectable:
entry_points:
- web/index.dart
私はさまざまなgit の問題を調べてみました。しかし、問題が何であるかを理解することはできず、それを修正するのは難しい. たぶん、私が使用している初期リリースのバグです。