Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 473
Hamou Ouyaba Avatar asked Sep 13 '25 14:09

Hamou Ouyaba


1 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.

like image 122
Hamou Ouyaba Avatar answered Sep 15 '25 03:09

Hamou Ouyaba