我正在尝试为Google App Engine构建Dart应用程序,但Dart无法解析除0.0.1版本之外的任何appengine依赖项。这是我的pubspec.yaml:
name: MyApp
version: 0.0.1
dependencies:
angular2: 2.0.0-alpha.44
browser: ^0.10.0
appengine: '>=0.3.0 < 0.4.0'
transformers:
- angular2:
entry_points: web/main.dart
这是我得到的错误:
Package appengine has no versions that match >=0.3.0 <0.4.0 derived from:
- MyApp depends on version >=0.3.0 <0.4.0
我尝试了https://pub.dartlang.org/packages/appengine/versions中的每个appengine版本,但唯一有效的版本是^ 0.0.1
Downloading appengine 0.0.1...
Got dependencies!
我真的想使用比0.0.1更新的东西。有什么东西坏了还是我错过了什么?
*更新: 根据GünterZöchbauer的建议,我按照详细模式运行,这是输出:
ERR : Package appengine has no versions that match >=0.0.2 <0.4.0 derived from:
| - MyApp depends on version >=0.0.2 <0.4.0
FINE: Exception type: NoVersionException
FINE: package:pub/src/entrypoint.dart 154 Entrypoint.acquireDependencies.<async>
| ===== asynchronous gap ===========================
| dart:async _Completer.completeError
| package:pub/src/entrypoint.dart 199 Entrypoint.acquireDependencies.<async>
| ===== asynchronous gap ===========================
| dart:async _Future.then
| package:pub/src/entrypoint.dart 152 Entrypoint.acquireDependencies.<async>
| ===== asynchronous gap ===========================
| dart:async Future.Future.microtask
| package:pub/src/entrypoint.dart Entrypoint.acquireDependencies
| package:pub/src/command/get.dart 30 GetCommand.run
| package:args/command_runner.dart 178 CommandRunner.runCommand.<fn>
| dart:async Future.Future.sync
| package:args/command_runner.dart 131 CommandRunner.runCommand
| package:pub/src/command_runner.dart 130 PubCommandRunner.runCommand.<async>.<fn>
| dart:async Future.Future.sync
| package:pub/src/utils.dart 103 captureErrors.<fn>
| package:stack_trace Chain.capture
| package:pub/src/utils.dart 117 captureErrors
| package:pub/src/command_runner.dart 130 PubCommandRunner.runCommand.<async>
我将版本扩展为包含介于0.0.2和0.4.0之间的任何内容,但它失败了。即使我可以从网上手动下载版本,它肯定会抛出一个没有发现版本的错误。
答案 0 :(得分:1)
这是pub
的已知问题。如果它无法解析一组匹配的依赖关系,它有时会打印出误导性的消息。
pub upgrade --verbose
应该显示更多信息,以便调查哪些依赖项pub
无法找到兼容版本。
冲突是protobuf
包
appengine
0.3.2
取决于protobuf
0.5.0
angular2
2.0.0-alpha.44
取决于protobuf
0.4.2
但angular2
2.0.0-alpha.45
还取决于protobuf
0.5.0
如果您将角度依赖性更改为
angular2: ^2.0.0-alpha.44
或
angular2: 2.0.0-alpha.45
或
angular2: ^2.0.0-alpha
pub可以很好地解决所有依赖关系。