installing 'resource' library

68 views
Skip to first unread message

Nick Reid

unread,
Feb 5, 2016, 3:11:42 PM2/5/16
to Dart Misc
Hi all,

I'm trying to install the resource library that the Dart Team have released for importing static resources.  For some reason pub can't seem to do this even though I can successfully download a copy using `pub cache add resource`.  When I run `pub install` I get 

Package resource has no versions that match >=1.1.0 <2.0.0 derived from:
- <my package name> depends on version ^1.1.0

How do I get this library into my project? My dev machine is Windows 10 and I'm using the IntelliJ plugin if that matters. Any assistance you could give would be awesome.

Thanks,
    Nick

Natalie Weizenbaum

unread,
Feb 5, 2016, 3:15:20 PM2/5/16
to General Dart Discussion
It looks like you have a version conflict. Try running pub get with --verbosity=solver. That should provide more information about the actual conflict that's causing the download to fail.

--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

Don Olmstead

unread,
Feb 5, 2016, 3:28:49 PM2/5/16
to mi...@dartlang.org
I had a similar issue. I believe it was due to the SDK. Believe resource requires 1.14 at minimum.

Nick Reid

unread,
Feb 5, 2016, 4:00:04 PM2/5/16
to Dart Misc
Thanks for the tip!  It turned out that my SDK version needed to be updated, although pub gave no indication this was an issue. Even with verbosity on it just denied the existence of the version I specified.  Curiously, pub did tell me about older versions that didn't satisfy the constraint.  Perhaps this is a bug?

Nick Reid

unread,
Feb 5, 2016, 4:01:09 PM2/5/16
to Dart Misc
That was it! Thank you! Now I can get back to the task at hand.

Natalie Weizenbaum

unread,
Feb 5, 2016, 4:58:11 PM2/5/16
to General Dart Discussion
Pub's version solver's error messages are currently not great. It's a known issue, and one I intend to fix, but it'll take a serious amount of effort due to the complexity of the underlying problem so I haven't gotten around to it yet.

DoHyung Kim

unread,
Feb 6, 2016, 4:58:07 AM2/6/16
to mi...@dartlang.org
Nick,

FYI.

If you are to use it on the server side, it will work like a charm. But when it comes to the browsers, still has some issues to be resolved before it is fully useful there.

https://github.com/dart-lang/sdk/issues/25594

If your purpose of using resource is to use 'package' URI to refer to your resources and you are on browsers, then you should wait for a little bit more.

DH

2016년 2월 6일 토요일 오전 5시 11분 42초 UTC+9, Nick Reid 님의 말:
Reply all
Reply to author
Forward
0 new messages