Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pub get failed (65) on install #87

Closed
panuavakul opened this issue Oct 5, 2018 · 4 comments
Closed

pub get failed (65) on install #87

panuavakul opened this issue Oct 5, 2018 · 4 comments

Comments

@panuavakul
Copy link

Hi, I was looking to trying out Redux in Flutter. So I was creating a new Flutter project was installing this package and got the following error.

[flutter_redux] flutter packages get
Running "flutter packages get" in flutter_redux...
Error on line 19, column 3 of pubspec.yaml: A package may not list itself as a dependency.
  flutter_redux: ^0.5.2
  ^^^^^^^^^^^^^
pub get failed (65)
exit code 65

I also tried with flutter packages get -v and got the following result

[  +33 ms] executing: [/Users/panu/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +41 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/beta
[        ] executing: [/Users/panu/flutter/] git rev-parse --abbrev-ref HEAD
[  +11 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] beta
[        ] executing: [/Users/panu/flutter/] git ls-remote --get-url origin
[  +11 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[        ] executing: [/Users/panu/flutter/] git log -n 1 --pretty=format:%H
[  +13 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[        ] 5ab9e70727d858def3a586db7fb98ee580352957
[        ] executing: [/Users/panu/flutter/] git log -n 1 --pretty=format:%ar
[  +14 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[        ] 4 weeks ago
[        ] executing: [/Users/panu/flutter/] git describe --match v*.*.* --first-parent --long --tags
[  +15 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v0.8.2-0-g5ab9e7072
[ +182 ms] Running "flutter packages get" in flutter_redux...
[   +3 ms] Using /Users/panu/flutter/.pub-cache for the pub cache.
[   +2 ms] executing: [/Users/panu/Projects/FlutterProjects/flutter_redux/] /Users/panu/flutter/bin/cache/dart-sdk/bin/pub --verbosity=warning --verbose get --no-precompile
[ +349 ms] Error on line 19, column 3 of pubspec.yaml: A package may not list itself as a dependency.
[   +1 ms]   flutter_redux: ^0.5.2
[        ]   ^^^^^^^^^^^^^
[  +38 ms] Running "flutter packages get" in flutter_redux... (completed)
[  +12 ms] "flutter get" took 503ms.
pub get failed (65)

#0      throwToolExit (package:flutter_tools/src/base/common.dart:26:3)
#1      pub (package:flutter_tools/src/dart/pub.dart:170:5)
<asynchronous suspension>
#2      pubGet (package:flutter_tools/src/dart/pub.dart:104:13)
<asynchronous suspension>
#3      PackagesGetCommand._runPubGet (package:flutter_tools/src/commands/packages.dart:59:11)
<asynchronous suspension>
#4      PackagesGetCommand.runCommand (package:flutter_tools/src/commands/packages.dart:82:11)
<asynchronous suspension>
#5      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:372:18)
#6      _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#7      _rootRunUnary (dart:async/zone.dart:1132:38)
#8      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#9      _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#10     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#11     Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#12     Future._complete (dart:async/future_impl.dart:476:7)
#13     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#14     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#15     _rootRun (dart:async/zone.dart:1124:13)
#16     _CustomZone.run (dart:async/zone.dart:1021:19)
#17     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#18     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#19     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#20     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#21     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)

This is my flutter doctor -v

[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.13.6 17G65, locale en-JP)
    • Flutter version 0.8.2 at /Users/panu/flutter
    • Framework revision 5ab9e70727 (4 weeks ago), 2018-09-07 12:33:05 -0700
    • Engine revision 58a1894a1c
    • Dart version 2.1.0-dev.3.1.flutter-760a9690c2

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    • Android SDK at /Users/panu/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.0, Build version 10A255
    • ios-deploy 2.0.0
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] VS Code (version 1.27.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.18.0

[✓] Connected devices (1 available)
    • iPhone XS Max • 9675663B-343D-4B60-9620-4506B26FDB6A • ios • iOS 12.0 (simulator)

I was looking for solution, but didn't seems to find any with Google. Does anyone have the same problem?

Thanks

@panuavakul
Copy link
Author

I deleted the project and started a new project and it somehow it just magically work. I'll leave it to the mod to see if the ticket should be closed or not.

Thanks

@brianegan
Copy link
Owner

Hrm -- truly odd! It looks to me like you created your own project called "flutter_redux" and then tried to import the flutter_redux package into that project.

The problem: At that point, Dart will think your package is called flutter_redux and won't be able to import the third-party library.

Could that be the problem?

@panuavakul
Copy link
Author

Thanks for your reply, that seems to be the problem.
That was really stupid of me.
Since this is solved, I will just close it. Thanks again.

@emailsubjekt
Copy link

It makes no sense that you can't name projects the same as the libraries' names. Why would it be dumb calling your app image_picker and then not being able to use a library called image_picker in it because someone already used up the name for the name of a library? That makes no sense. There's going to be thousands of libraries, are you telling me all those names will then be taken and you wouldn't be able to call your app that name if you need that resource that has the same name? That just makes no sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants