找不到名为“ pubspec.yaml”的文件;在 [英] Could not find a file named "pubspec.yaml" in
问题描述
我是Dart的新手。
我创建了一个简单的Web应用程序,但是当我要运行它时,我在工具输出中收到了以下消息:
I create a simple Web application but when I want to run it I got this message in "Tools Output" :
在/home/reza/.pubcache/hosted/pub.dartlang.org/browser中找不到名为 pubspec.yaml的文件-0.10.0 + 2。
Could not find a file named"pubspec.yaml"in"/home/reza/.pubcache/hosted/pub.dartlang.org/browser-0.10.0+2".
如何解决此问题?
我使用Ubuntu 14.04LTS 64bit和DartDditor 1.7.2
I use Ubuntu 14.04LTS 64bit and DartDditor 1.7.2
推荐答案
这件事在我身上已经发生过好几次了:
This has happened to me several times:
对我来说,最终解决的事情是(OS X)删除发布缓存:
What's ultimately solved things for me (OS X) is deleting pub's cache:
sudo rm -Rf / Users /<用户名> /。pub-cache
还删除项目根目录中的packages目录:
Also delete the packages directory in your project's root:
sudo rm -Rf包
然后 pub再次在您的项目中获得
,但确保您不是以root用户身份运行( whoami
会告诉您,然后退出
我会让你离开那里。)
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).
这篇关于找不到名为“ pubspec.yaml”的文件;在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!