私はちょうどダーツを学び始めました。パッケージ "dart_to_js_script_rewriter"は依存関係ではありません
まず、angle2-dartベースのプロジェクトをhttps://angular.io/docs/dart/latest/quickstart.htmlから作成して、正しく動作させました。
今私はhttps://pub.dartlang.org/packages/auth0_lockからauth0ロックダーツパッケージを追加したいので、私は次のようにpubspec.yamlを変更:
name: go_dart_angular2_zingchart
description: Go Dart Angular2 with ZingChart Started Kit
version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: ^2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
auth0_lock: ^0.1.0
transformers:
- angular2:
platform_directives:
- 'package:angular2/common.dart#COMMON_DIRECTIVES'
platform_pipes:
- 'package:angular2/common.dart#COMMON_PIPES'
entry_points: client/web/main.dart
- dart_to_js_script_rewriter
と私はpub get
を実行したときに、今、私は次のエラーを取得する:
Error on line 15, column 3 of ../../../.pub-cache/hosted/pub.dartlang.org/auth0_lock-0.1.0/pubspec.yaml: Error loading transformer "dart_to_js_script_rewriter": package "dart_to_js_script_rewriter" is not a dependency.
- dart_to_js_script_rewriter
^^^^^^^^^^^^^^^^^^^^^^^^^^
私は私がやっている全くわからDARTへの新しいじゃないので、..私はこの問題を解決する方法が分からない:)
任意のアイデア?
ありがとうございました!
参照を使用して、それをインポートすることができ、またhttps://github.com/dart-lang/pub/issues/1259 。これは 'pub'の制限です。パッケージ自体がビルドされているときのみトランスフォーマーが実行されるようにするための 'dev_transformers'をサポートすることが議論されました。別のパッケージの依存関係としてビルドされたときではありません。変圧器は、例として 'auth0_lock'でのみ使用され、依存関係として使用される場合は無関係です。 –