2014-02-21 48 views
1

编译飞镖应用js的出现这两种错误:哪种方式去与这些错误

Nº1:

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

Nº2:

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

的对象qE被通过dart2js创建。 如何找到解决方案? 有适当的工具可以找到解决方案吗? 感谢您的提前!

回答

2

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

相关的未决问题:
- duplicate polymer-element registration should not break the app
- Get error "Uncaught InvalidStateError: Failed to call 'register' on 'Document' for type 'polymer-element'

对于N2使用pub build --mode=debug让您得到未重整名,然后使用可用的策略之一来解决该问题(使用MirrorsUsed,@observable的, @reflectable)

+0

嗨,我只使用聚合物。 – marcelo

+0

你是否在Dart代码中注册你的组件或者只导入HTML? 或者你可能有重复的@CustomTag()注解?但我想那也不会在Dartium中运行。 –

+0

在类定义(文件.dart)中,在类镖前,写@CustomTag(),在html中只有聚合元素定义,名称,模板标签等...... – marcelo