orthros / dart-epub

Epub Reader and Writer for Dart
MIT License
218 stars 226 forks source link

Package epub has no versions that match >=1.2.0 <2.0.0 #4

Closed jmgeffroy closed 6 years ago

jmgeffroy commented 6 years ago

Hi, I'm trying to play with this package but until now I get the following error when doing flutter packages get:

Package epub has no versions that match >=1.2.0 <2.0.0 derived from:
- EpubTestApp depends on version ^1.2.0

Any idea? Thanks a lot in advance!

orthros commented 6 years ago

Thanks for reporting! I'll have to take a look at that.

Can you reproduce in a dart-only environment (i.e. no flutter involved)? Also what versions of Dart & Flutter are you using? I ask because right now using

Dart Version

C:\Dev\tmp\dartProjTemp>dart --version
Dart VM version: 1.24.2 (Thu Jun 22 08:55:56 2017) on "windows_x64"

and this pubspec.yaml

name: dartProjTmp
version: 1.0.0
author: Colin Nelson <colin@orthros.co>
description: Test Package
environment:
  sdk: ">=1.21.0 <2.0.0"
dependencies:
  epub: ^1.2.0
dev_dependencies:  

I am downloading and installing the package just fine.

Thanks!

orthros commented 6 years ago

So I can confirm I can replicate this issue, but I also notice that when running

flutter --version

from an out of the box flutter install I get the following

C:\Dev\tmp\test_proj> flutter --version
Flutter 0.1.5 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 3ea4d06340 (3 weeks ago) • 2018-02-22 11:12:39 -0800
Engine • revision ead227f118
Tools • Dart 2.0.0-dev.28.0.flutter-0b4f01f759

The last line: Dart 2.0.0-dev makes me think that this is why pubcan't resolve the package as the pubspec.yaml for this project explicitly states < 2.0.0

Can you confirm you are getting similar output from flutter --version?

Thanks!

orthros commented 6 years ago

Last follow up for now: I've installed the dart beta version (2.0.0)

C:\Dev\Personal\dart-epub [master ≡ +1 ~0 -0 !]> dart --version
Dart VM version: 2.0.0-dev.35.0 (Fri Mar 9 13:09:14 2018 +0100) on "windows_x64"

And after a pub get I can confirm that my unit tests pass.

I don't want to prematurely release the package, but if you can confirm that the dart version you are using with flutter is ~2.0.0 I'll test further and update the version. Otherwise, I'll start down other diagnostic routes.

Thanks!

jmgeffroy commented 6 years ago

Hi ! Sorry for the late reply, I'm located in France... And thanks a lot for your ultra-fast replies. Yes I confirm I'm getting the exact same info with flutter --version:

Flutter 0.1.5 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 3ea4d06340 (3 weeks ago) • 2018-02-22 11:12:39 -0800
Engine • revision ead227f118
Tools • Dart 2.0.0-dev.28.0.flutter-0b4f01f759

Best regards

orthros commented 6 years ago

No need to apologize. We are from all over around here!

With the latest merge to master #12 this should work.

Using this pubspec.yaml

name: test_proj
description: A new Flutter project.
dependencies:
  flutter:
    sdk: flutter
  epub:  ^1.2.8
  cupertino_icons: ^0.1.0
dev_dependencies:
  flutter_test:
    sdk: flutter
flutter:
  uses-material-design: true

And running flutter packages pub get successfully imported the package.

Can you confirm it is resolved for you too? Thanks!

jmgeffroy commented 6 years ago

Hi, Thank you so much, it works ! Fantastic, eager to further test... Very best regards,

orthros commented 6 years ago

Glad to hear! I'll close this. Please let me know if you encounter any other issues 👍