1

我有一个 dart-polymer 项目在 dartium 中工作得很好。当更改为设备模式/响应式设计模式时,它会引发多个第一类错误,我已经删除了其中一些:

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)

我可以在这里看到另一个在早期版本的聚合物飞镖中也有问题。

我的 .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 问题 polymer_interop、polymer_elements 和polymer-dart。但无法弄清楚问题可能是什么,并且很难解决它。也许这是我正在使用的早期版本之一中的一个错误。

4

0 回答 0