Error: Error when reading 'pub': No such file or directory

Viewed 2039

I am trying to set up a Dart project to use shelf. Now to enable hot reload, I am trying to install dartman. On doing

pub global activate dartman

Command 'pub' not found, did you mean:

The I try

dart pub global activate dartman

and I get Error: Error when reading 'pub': No such file or directory

How do I solve this problem?

1 Answers

This can happen when you have installed Dart-sdk two times. One time as a windows installer, and the other through chocolatey for instance. Uninstall the one you have in "Add/Remove programs", or at least make sure you only have one, and it should work.

Related