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`
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!
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
thanks
thanks a lot
Thank you
Thank you :sweat_smile:
@felangel felangel you are absolutely right thank you so much
Don't use same package name and dependency name. Ex; liquid_swipe: ^1.5.0 package name: liquid_swipe
Thank you, but can we have a solution in which we don't have to change the app name
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
Nice catch! Thanks
Most helpful comment
Hi @rrifafauzikomara 馃憢
I'm guessing the name of your flutter project is also
flutter_bloc
.Can you check if that's the case and if not could you please include the full
pubspec.yaml
file?Thanks!