0

在为 dart-html5-samples 运行“pub install”时遇到了一些奇怪的错误。第一个是:

Illegal argument(s): join(): part 0 was null, but part 1 was not.

第二个是:

Running pub install ...
Pub install failed, [1] Resolving dependencies...
Could not find package "unittest 0.0.0-r.13075" at http://pub.dartlang.org.

发生了什么事,我该如何解决?

4

1 回答 1

0

第一个错误是:

Illegal argument(s): join(): part 0 was null, but part 1 was not.

那是因为 pubspec.yaml 包含:

dependencies:
  htmlescape:
    sdk: htmlescape

htmlescape 不再随 SDK 一起提供。删除依赖项解决了这个问题。我只是在我的 lib 目录中制作了 htmlescape.dart 的副本。最终,一旦修复了以下错误,我将不再需要我自己的副本:

http://code.google.com/p/dart/issues/detail?id=1657

第二个错误是:

Running pub install ...
Pub install failed, [1] Resolving dependencies...
Could not find package "unittest 0.0.0-r.13075" at http://pub.dartlang.org.

dart-html5-samples 依赖于 vector_math,而 vector_math 又依赖于 unittest。我认为他们一定改变了 pub 加载 unittest 的方式。运行pub update解决了问题。

于 2013-01-04T23:02:57.063 回答