Getting Started application failed to run

532 views Asked by At

I started going through the Dart Getting Started tutorial, and I'm having some problems. When I went to File>Open Existing Folder> one-hour-codelab-master I'm getting a warning in my console saying :

--- Dec 13, 2013 11:50:29 AM Running pub get ... ---
Pub get failed, [255] \dart\dart-sdk\" was unexpected at this time.

** Warning: Application may fail to run since packages did not get installed.
Try running pub get again. **

Thinking it was just being annoying, I compared my file tree to the one in the tutorial, I'm missing the packages folder and the pubspec.lock file. Any help would be much appreciated. My Dart Editor is up to date as well.

2

There are 2 answers

0
Günter Zöchbauer On

The pub package manager failed to download the required dependencies. Can you try again using the context menu 'pub get' and 'pub upgrade' on the file pubspec.yaml in your project. I don't know the exact caption of the menu items becaue I have no computer nearby and I always do this on the command line myself. You can alternatively try calling these commands from command line too from within your app directory (wher the pubspec.yaml file is stored) and you will probably get a better error message.

0
MadcapJake On

Currently it seems that there is an issue with spaces in the path to pub (at least on Windows). For example,

C:\Program Files\dart\dart-sdk\bin\

So move to a whitespace-free directory path:

C:\Path_Without_Spaces\dart\dart-sdk\bin\

Or simply:

C:\dart\dart-sdk\bin\

Don't forget to update your env path!

Issue 10104 in their issue tracker