正在运行" pub install"对于dart-html5-samples会导致奇怪的错误

时间:2013-01-04 23:02:57

标签: dart dart-pub

我在为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.

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

1 个答案:

答案 0 :(得分:0)

第一个错误是:

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

那是因为pubspec.yaml包含:

dependencies:
  htmlescape:
    sdk: htmlescape
SDK不再附带htmlescape。删除依赖项修复了问题。我只是在我的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,它取决于unittest。我认为他们肯定已经改变了pub来加载unittest的方式。正在运行pub update解决了问题。