简体   繁体   中英

Running “pub install” for dart-html5-samples leads to weird errors

I encountered some weird errors when running "pub install" for dart-html5-samples. The first one was:

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

The second one was:

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

What's going on, and how do I fix it?

The first error is:

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

That's because pubspec.yaml contained:

dependencies:
  htmlescape:
    sdk: htmlescape

htmlescape no longer comes with the SDK. Removing the dependency fixed the problem. I simply made a copy of htmlescape.dart in my lib directory. Eventually, I won't need my own copy once the following bug is fixed:

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

The second error is:

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 depends on vector_math which depends on unittest. I think they must have changed how unittest is loaded by pub. Running pub update fixed the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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