我剛開始學習飛鏢。包「dart_to_js_script_rewriter」不是依賴關係
首先,我從https://angular.io/docs/dart/latest/quickstart.html創建了一個基於angular2-dart的項目,它工作正常。
現在我想從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'中用作示例,在作爲依賴項使用時不相關。 –