abitofevrything / dart_ncurses

MIT License
0 stars 1 forks source link

Package depends on itself? #2

Closed dsokoloski closed 1 year ago

dsokoloski commented 1 year ago

It appears to have a recursive dependency?

darryl-mbp:ncurses $ dart pub add ncurses
Because ncurses depends on ncurses, version solving failed.
abitofevrything commented 1 year ago

Hi, it looks like you've created a dart project called ncurses and are trying to add this package to it - Dart implicitly creates a pseudo-package with the current project name (so you can import package:project_name/file.dart) so you cannot name your project the same as one of your dependencies.

What you're doing here is actually instructing dart to make your own project depend on itself, which it doesn't want to for obvious reasons :)

Try changing the name field in pubspec.yaml to something else

dsokoloski commented 1 year ago

Right! My mistake! I understand... thanks for the explanation (I'm new to Dart)!