升级到聚合物后无法运行应用程序:^ 1.0.0-rc.10且可反映:^ 0.5.0

时间:2015-12-19 03:48:44

标签: dart dart-polymer

我刚刚升级到聚合物:^ 1.0.0-rc.10,带有可反射的dependecy_overrides ^ 0.5.0。

我观察到每当我使用上述聚合物升级项目并且可反射时,我在输出中得到以下行

Error on line 1, column 1 of https://pub.dartlang.org/api/packages/initialize: Invalid description: "test_package" is a relative path, but this isn't a local pubspec.

尝试运行我的应用程序失败,并显示以下错误

"P:\Program Files\Dart\dev\dart-sdk\bin\pub.bat" serve web --port=56435
Loading source assets...
Loading web_components, reflectable and test/pub_serve transformers...
Serving epimss_polymer_app web on http://localhost:56435
Build error:
Transform WebComponents on epimss_polymer_app|web/index.html threw error: Class 'LibraryElementImpl' has no instance getter 'node'.

NoSuchMethodError: method not found: 'node'
Receiver: Instance of 'LibraryElementImpl'
Arguments: []
dart:core-patch/object_patch.dart 42                 Object._noSuchMethod
dart:core-patch/object_patch.dart 45                 Object.noSuchMethod
package:initialize/transformer.dart 240              _BootstrapFileBuilder._readAnnotations
package:initialize/transformer.dart 213              _BootstrapFileBuilder._readLibraries
package:initialize/transformer.dart 209              _BootstrapFileBuilder._readLibraries
package:initialize/transformer.dart 209              _BootstrapFileBuilder._readLibraries
package:initialize/transformer.dart 209              _BootstrapFileBuilder._readLibraries
package:initialize/transformer.dart 193              _BootstrapFileBuilder.run
package:initialize/transformer.dart 35               generateBootstrapFile
package:web_components/build/web_components.dart 32  generateWebComponentsBootstrap
package:web_components/build/web_components.dart 82  WebComponentsTransformer.apply.<fn>.<fn>
dart:async/zone.dart 1149                            _RootZone.runUnary
dart:async/future_impl.dart 551                      _Future._propagateToListeners.handleValueCallback
dart:async/future_impl.dart 637                      _Future._propagateToListeners
dart:async/future_impl.dart 424                      _Future._completeWithValue
dart:async/future_impl.dart 479                      _Future._asyncComplete.<fn>
dart:async/schedule_microtask.dart 41                _microtaskLoop
dart:async/schedule_microtask.dart 50                _startMicrotaskLoop
dart:isolate-patch/isolate_patch.dart 96             _runPendingImmediateCallback
dart:isolate-patch/isolate_patch.dart 149            _RawReceivePortImpl._handleMessage

dart:core                                            Object.noSuchMethod
package:initialize/transformer.dart 240              _BootstrapFileBuilder._readAnnotations
package:initialize/transformer.dart 213              _BootstrapFileBuilder._readLibraries
package:initialize/transformer.dart 209              _BootstrapFileBuilder._readLibraries
package:initialize/transformer.dart 209              _BootstrapFileBuilder._readLibraries
package:initialize/transformer.dart 209              _BootstrapFileBuilder._readLibraries
package:initialize/transformer.dart 193              _BootstrapFileBuilder.run
package:initialize/transformer.dart 35               generateBootstrapFile
package:web_components/build/web_components.dart 32  generateWebComponentsBootstrap
package:web_components/build/web_components.dart 82  WebComponentsTransformer.apply.<fn>.<fn>
[web] GET index.html => Could not find asset epimss_polymer_app|web/index.html.
[Info from Reflectable on epimss_polymer_app|ReflectableTransformed]:
Ignoring entry point my_project.web.index that does not include the class `Reflectable`.
Build completed with 1 errors.

运行pub cache fix,但错误仍然存​​在。

有关如何最好地解决问题的任何建议。

编辑1

我已经缩小了由web_component,reflectable或polymer引起的问题。

我用舞台手创建了一个新的聚合物应用程序,应用程序运行。

新的polymer-app pubspec.yaml如下所示:

name: 'ui_tester'
version: 0.0.1
description: A web app built using polymer.dart.
#author: Your Name <email@example.com>
#homepage: https://www.example.com

environment:
  sdk: '>=1.9.0 <2.0.0'

dependencies:
  browser: ^0.10.0
  polymer_elements: ^1.0.0-rc.1
  polymer: ^1.0.0-rc.10
  reflectable: ^0.5.0
#  polymer: ^1.0.0-rc.9
#  reflectable: ^0.4.0
  web_components: ^0.12.1

transformers:
- web_components:
    entry_points: web/index.html
- reflectable:
    entry_points: web/index.bootstrap.initialize.dart
- $dart2js:
    $include: '**/*.bootstrap.initialize.dart'
    minify: true
    commandLineOptions:
    - --trust-type-annotations
    - --trust-primitives

一旦我将依赖关系改为可反映:0.5.0和聚合物:^ 1.0.0-rc.10分别从0.40和1.0.0.rc9(评论行),问题一致地再现。

我建议这里可能存在错误。

我也注意到舞台手现在使用

transformers:
- reflectable:
    entry_points: web/index.bootstrap.initialize.dart

而不是

transformers:
- reflectable:
    entry_points: web/index.dart

代码与他们的相似吗?

干杯

0 个答案:

没有答案