简体   繁体   English

Pubspec.yaml引发不一致的错误并且没有冲突

[英]Pubspec.yaml throwing inconsistent errors and no conflicts

I'm seeing an odd issue with Dartson & mongo_dart. 我看到Dartson和mongo_dart出现了一个奇怪的问题。

I was running mongo_dart 0.1.46. 我正在运行mongo_dart 0.1.46。 - I need to upgrade it to mongo_dart 0.2.4 -我需要将其升级到mongo_dart 0.2.4

However, when i upgrade mongo_dart - i get the following error about dartson 但是,当我升级mongo_dart时-我收到有关dartson的以下错误

Package mongo_dart has no versions that match 0.2.4 derived from: - tickets depends on version 0.2.4 软件包mongo_dart没有与0.2.4匹配的版本,该版本源自:-票证取决于0.2.4版本

using: 使用:

dependencies:
#Server Dependencies
  json_object: "1.0.19"
  mongo_dart: "0.2.4"
  connection_pool: "0.1.0+2"
  dartson: "0.2.4"
  guinness: "0.1.17"
  html: "0.12.2"
  shelf: '>=0.6.2 <0.7.0'
  shelf_static: "0.2.2"
  shelf_route: "0.14.0"

This is odd, as mongo_dart: '0.2.4' exists on pub.dartlang, and it works in isolation https://pub.dartlang.org/packages/mongo_dart 这很奇怪,因为mongo_dart:pub.dartlang上存在“ 0.2.4”,并且可以单独使用https://pub.dartlang.org/packages/mongo_dart


By testing the removal of each individual package in pubspec.yaml, i was able to identify a conflict with dartson. 通过测试pubspec.yaml中每个软件包的删除,我能够确定与dartson的冲突。

If i move dartson to the top of the dependency list i get the reverse: 如果我将dartson移到依赖项列表的顶部,则会得到相反的结果:

dependencies:
#Server Dependencies
  dartson: "0.2.4"
  json_object: "1.0.19"
  mongo_dart: "0.2.4"
  connection_pool: "0.1.0+2"
  guinness: "0.1.17"
  html: "0.12.2"
  shelf: '>=0.6.2 <0.7.0'
  shelf_static: "0.2.2"
  shelf_route: "0.14.0"

Package dartson has no versions that match 0.2.4 derived from: - tickets depends on version 0.2.4 软件包dartson没有与以下版本相匹配的0.2.4版本:-票证取决于0.2.4版本

Removing dartson all together allows for mongo_dart to install correctly. 一起删除dartson可使mongo_dart正确安装。

Is there a known issue between the two libraries? 这两个库之间是否存在已知问题? Is there a conflict thats not getting surfaced? 有没有冲突浮出水面?

Question : How do i get mongo_dart 0.2.4 to run with Dartson 0.2.4 问题 :我如何使mongo_dart 0.2.4与Dartson 0.2.4一起运行

I've run pub get in verbose mode on your pubspec, the problems seems to be in different dependencies from package logging Dartson depends have dependency on version 0.9, mongo_dart on current version 0.11 You can ask dartson authors, have they some consideration about current version of logging 我已经在您的pubspec上以详细模式运行pub get,问题似乎与软件包logging存在不同的依赖关系Dartson依赖于0.9版,而mongo_dart依赖于当前版本0.11。 logging

Meanwhile you can try to add dependency_ovverride to your pubspec. 同时,您可以尝试将dependency_ovverride添加到您的pubspec。 When I added ovverride to your pubspec, it works for me 当我将ovverride添加到您的pubspec中时,它对我有用

name: test_pubspec

dependencies:
  json_object: "1.0.19"
  mongo_dart: "0.2.4"
  connection_pool: "0.1.0+2"
  dartson: "0.2.4"
  guinness: "0.1.17"
  html: "0.12.2"
  shelf: '>=0.6.2 <0.7.0'
  shelf_static: "0.2.2"
  shelf_route: "0.14.0"
dependency_overrides:
  logging: '^0.11.0'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM