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

A package may not list itself as a dependency. (flutter_bloc: ^0.9.0) #181

Closed
rrifafauzikomara opened this issue Mar 29, 2019 · 24 comments
Closed
Assignees
Labels
question Further information is requested

Comments

@rrifafauzikomara
Copy link

When i try to get the package i get this

`[flutter_bloc] flutter packages get
Running "flutter packages get" in flutter_bloc...
Error on line 20, column 3 of pubspec.yaml: A package may not list itself as a dependency.

flutter_bloc: ^0.9.0

^^^^^^^^^^^^
pub get failed (65)
exit code 65`

@felangel
Copy link
Owner

Hi @rrifafauzikomara 👋

I'm guessing the name of your flutter project is also flutter_bloc.

name: flutter_bloc

dependencies:
  flutter_bloc: ^0.9.0

Can you check if that's the case and if not could you please include the full pubspec.yaml file?

Thanks!

@felangel felangel self-assigned this Mar 29, 2019
@felangel felangel added question Further information is requested waiting for response Waiting for follow up labels Mar 29, 2019
@rrifafauzikomara
Copy link
Author

Hi @felangel

Yes, you are right. That happens because the project name is the same as the library name. So when running the "flutter packages get" command, flutter reads the project name instead of the library name. Thank you

@AliAon
Copy link

AliAon commented Dec 30, 2019

thanks

@JeanGonzalo
Copy link

thanks a lot

@viralvaghela
Copy link

Thank you

@paurakhsharma
Copy link

Thank you 😅

@vinayvishnu725
Copy link

@felangel felangel you are absolutely right thank you so much

@subrotobasak
Copy link

Don't use same package name and dependency name. Ex; liquid_swipe: ^1.5.0 package name: liquid_swipe

@Arjupta
Copy link

Arjupta commented Aug 25, 2020

Thank you, but can we have a solution in which we don't have to change the app name

@reshnu
Copy link

reshnu commented Aug 28, 2020

Thanks,this is because my project name and package name is same so this error happens after that changing my project name it working fine

@and2carvalho
Copy link

Nice catch! Thanks

@keshkaush
Copy link

thanks a lot..u saved the night..!!

@akmaljoha
Copy link

thank you so muchhh bruhjhhhhhhhhhhhhhhhhhh really help!

@hayatbangash55
Copy link

Thanks

@jhon2520
Copy link

Thanks a lot. I had the same problem.

@tinhnvc
Copy link

tinhnvc commented Sep 1, 2021

Hi @rrifafauzikomara 👋

I'm guessing the name of your flutter project is also flutter_bloc.

name: flutter_bloc

dependencies:
  flutter_bloc: ^0.9.0

Can you check if that's the case and if not could you please include the full pubspec.yaml file?

Thanks!

Yes, thanks a lot. ❤

@furkanKuran
Copy link

Thank u @felangel

@LakshanKodithuwakku
Copy link

Thank you!

@ahmeedev
Copy link

Thanku Man you save my time

@nhoaichuong2001
Copy link

That was awesome

@BisratGirma
Copy link

thanks

@behnambagi
Copy link

thanks goood man

@IrfanAbdulghaffar
Copy link

thanks for this buddy

@Enobong-kingsley
Copy link

Thanks a lot guys this really helped.

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

No branches or pull requests