问题
I'm new with Dart.
I create a simple Web application but when I want to run it I got this message in "Tools Output" :
Could not find a file named"pubspec.yaml"in"/home/reza/.pubcache/hosted/pub.dartlang.org/browser-0.10.0+2".
How can I fix this problem ?
I use Ubuntu 14.04LTS 64bit and DartDditor 1.7.2
回答1:
This has happened to me several times:
What's ultimately solved things for me (OS X) is deleting pub's cache:
sudo rm -Rf /Users/<username>/.pub-cache
Also delete the packages directory in your project's root:
sudo rm -Rf packages
Then pub get
again in your project(s), but make sure that you are not operating as root (a whoami
will tell you, and an exit
will get you out of there).
回答2:
I looks like your pub cache is corrupted. You can try to run pub cache repair
from the command line but I think that this is still not working when the pubspec.yaml
file is missing (there was an open issue about this - found it: http://dartbug.com/21418). Please try to delete the folder /home/reza/.pubcache/hosted/pub.dartlang.org/browser-0.10.0+2
and then run pub get
from within your project directory or from DartEditor.
来源:https://stackoverflow.com/questions/27217278/could-not-find-a-file-named-pubspec-yaml-in