1

将 Dart 应用程序编译为 js 会出现这两个错误:

编号 1:

InvalidStateError: Failed to call 'register' on 'Document' for type 'polymer-element': a type with that name is already registered.

编号 2:

Breaking on exception: TypeError: Object #<qE> has no method 'vL'

对象 qE 由 dart2js 创建。如何找到解决方案?有合适的工具来寻找解决方案吗?感谢提前!

4

1 回答 1

2

我听说在同一个应用程序中使用 Angular 和 Polymer 时会发生 N1。这是一个已知的错误。

相关的未解决问题:
-重复的聚合物元素注册不应破坏应用程序
-获取错误“Uncaught InvalidStateError: Failed to call 'register' on 'Document' for type 'polymer-element'

对于 N2 使用pub build --mode=debug,您可以获得未损坏的名称,然后使用一种可用的策略来解决问题(使用 MirrorsUsed、@observable、@reflectable)

于 2014-02-21T08:29:53.170 回答