Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

pub get failed : A package may not list itself as a dependency

Writer Matthew Martinez

I'm having this problem in pubspec.yaml :

here the pubspec.yaml :

 dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 pluto_grid: ^2.9.3

and here is the Error :

[pluto_grid] flutter pub get
Running "flutter pub get" in pluto_grid...
Error on line 37, column 3 of pubspec.yaml: A package may not list itself as a dependency. ╷
37 │ pluto_grid: ^2.9.3 │ ^^^^^^^^^^ ╵
pub get failed (65; ╵)
exit code 65

need to know what's wrong, used the same in other project and worked perfectly.

5 Answers

I found why i'm getting this Error, this happens because the project name is the same as the library name. so if you have the same Error as this just try to change the project name.

4

the project package name should not be the same name of added library's name in pubspec.yaml

change you project name than solve enter image description here

1

had the same issue, changing the filename resolved it. The problem was that the filename and dependency name was the same.

Change your project name and try again.

That's not necessary to declare your own project as a dependency in the project's pubspec.yaml

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.