程序包 code_transformers 没有匹配的版本
Package code_transformers has no versions that match
我正在尝试为我继承的使用 AngularDart 的代码库设置一个新环境。最初的开发人员 4 年前离开了,所以我无法访问他的工作环境。我是 Dart 的新手,所以也许这是一个简单的答案,但在四处寻找时我还没有找到解决方案。这也是 AngularDart 的旧版本,所以我不确定它是否起作用,但我现在无法升级它。
我目前在我的系统上使用 Dart 1.24.3。从命令行或通过 Eclipse 生成相同的结果。
我的pubspec.yaml
只包含:
name: <app name>
description: <app description>
dependencies:
angular: 0.14.0
transformers:
- angular:
html_files: web/index.html
因为这是一个新环境,所以没有包文件,所以我尝试 运行 pub get
并收到以下错误。
Pub get failed, [1] Resolving dependencies...
Package code_transformers has no versions that match >=0.1.4+2 <0.2.0 derived from:
- angular 0.14.0 depends on version >=0.1.4+2 <0.2.0
如果我 运行 pub get --trace
那么这个附加信息在日志中,用于确实落入该范围的三个版本(其他只是给出通常的不匹配消息):
...
version 0.2.0+3 of code_transformers doesn't match >=0.1.4+2 <0.2.0:
angular 0.14.0 from hosted -> code_transformers >=0.1.4+2 <0.2.0 from hosted (code_transformers)
inconsistent constraints on barback:
code_transformers 0.1.6 from hosted -> barback >=0.11.0 <0.15.0 from hosted (barback)
angular 0.14.0 from hosted -> barback >=0.13.0 <0.17.0 from hosted (barback)
pub itself -> barback >=0.15.0 <0.15.3 from hosted (barback)
inconsistent constraints on barback:
code_transformers 0.1.5 from hosted -> barback >=0.11.0 <0.15.0 from hosted (barback)
angular 0.14.0 from hosted -> barback >=0.13.0 <0.17.0 from hosted (barback)
pub itself -> barback >=0.15.0 <0.15.3 from hosted (barback)
inconsistent constraints on barback:
code_transformers 0.1.4+2 from hosted -> barback >=0.11.0 <0.15.0 from hosted (barback)
angular 0.14.0 from hosted -> barback >=0.13.0 <0.17.0 from hosted (barback)
pub itself -> barback >=0.15.0 <0.15.3 from hosted (barback)
version 0.1.4+1 of code_transformers doesn't match >=0.1.4+2 <0.2.0:
angular 0.14.0 from hosted -> code_transformers >=0.1.4+2 <0.2.0 from hosted (code_transformers)
...
基于一些 posts/articles 我已经尝试了很多东西,但我发现一个常见的方法是将它添加到 pubspec.yaml
:
dependency_overrides:
code_transformers: '>=0.2.0 <0.3.0'
但这最终会产生一个新的错误,所以我认为这可能只是进入了更深层次的依赖地狱。无论我指定的范围如何,调整覆盖版本都会出现此错误。
Resolving dependencies...
Warning: You are using these overridden dependencies:
! code_transformers 0.2.9+3
Got dependencies!
Precompiling dependencies...
Loading source assets...
Loading di/module_transformer transformers...
Unable to spawn isolate: Unhandled exception:
Could not import "package:async/async.dart" from "package:$pub/serialize.dart": Failure getting http://localhost:34928/packages/async/async.dart:
404 Not Found
null
有没有人对如何解决这个依赖地狱有建议?关于 async.dart
包的第二个错误可能是因为我使用的是较新版本的 Dart SDK?
我正在尝试为我继承的使用 AngularDart 的代码库设置一个新环境。最初的开发人员 4 年前离开了,所以我无法访问他的工作环境。我是 Dart 的新手,所以也许这是一个简单的答案,但在四处寻找时我还没有找到解决方案。这也是 AngularDart 的旧版本,所以我不确定它是否起作用,但我现在无法升级它。
我目前在我的系统上使用 Dart 1.24.3。从命令行或通过 Eclipse 生成相同的结果。
我的pubspec.yaml
只包含:
name: <app name>
description: <app description>
dependencies:
angular: 0.14.0
transformers:
- angular:
html_files: web/index.html
因为这是一个新环境,所以没有包文件,所以我尝试 运行 pub get
并收到以下错误。
Pub get failed, [1] Resolving dependencies...
Package code_transformers has no versions that match >=0.1.4+2 <0.2.0 derived from:
- angular 0.14.0 depends on version >=0.1.4+2 <0.2.0
如果我 运行 pub get --trace
那么这个附加信息在日志中,用于确实落入该范围的三个版本(其他只是给出通常的不匹配消息):
...
version 0.2.0+3 of code_transformers doesn't match >=0.1.4+2 <0.2.0:
angular 0.14.0 from hosted -> code_transformers >=0.1.4+2 <0.2.0 from hosted (code_transformers)
inconsistent constraints on barback:
code_transformers 0.1.6 from hosted -> barback >=0.11.0 <0.15.0 from hosted (barback)
angular 0.14.0 from hosted -> barback >=0.13.0 <0.17.0 from hosted (barback)
pub itself -> barback >=0.15.0 <0.15.3 from hosted (barback)
inconsistent constraints on barback:
code_transformers 0.1.5 from hosted -> barback >=0.11.0 <0.15.0 from hosted (barback)
angular 0.14.0 from hosted -> barback >=0.13.0 <0.17.0 from hosted (barback)
pub itself -> barback >=0.15.0 <0.15.3 from hosted (barback)
inconsistent constraints on barback:
code_transformers 0.1.4+2 from hosted -> barback >=0.11.0 <0.15.0 from hosted (barback)
angular 0.14.0 from hosted -> barback >=0.13.0 <0.17.0 from hosted (barback)
pub itself -> barback >=0.15.0 <0.15.3 from hosted (barback)
version 0.1.4+1 of code_transformers doesn't match >=0.1.4+2 <0.2.0:
angular 0.14.0 from hosted -> code_transformers >=0.1.4+2 <0.2.0 from hosted (code_transformers)
...
基于一些 posts/articles 我已经尝试了很多东西,但我发现一个常见的方法是将它添加到 pubspec.yaml
:
dependency_overrides:
code_transformers: '>=0.2.0 <0.3.0'
但这最终会产生一个新的错误,所以我认为这可能只是进入了更深层次的依赖地狱。无论我指定的范围如何,调整覆盖版本都会出现此错误。
Resolving dependencies...
Warning: You are using these overridden dependencies:
! code_transformers 0.2.9+3
Got dependencies!
Precompiling dependencies...
Loading source assets...
Loading di/module_transformer transformers...
Unable to spawn isolate: Unhandled exception:
Could not import "package:async/async.dart" from "package:$pub/serialize.dart": Failure getting http://localhost:34928/packages/async/async.dart:
404 Not Found
null
有没有人对如何解决这个依赖地狱有建议?关于 async.dart
包的第二个错误可能是因为我使用的是较新版本的 Dart SDK?