【发布时间】:2016-09-13 23:58:45
【问题描述】:
我正在尝试使用 yeoman 创建一个 HelloWorld angularjs 应用程序。安装完所有东西并生成应用程序后,我使用命令 grunt 启动应用程序,但出现此错误
Running "clean:server" (clean) task
Warning: Cannot delete files outside the current working directory. Use --force to continue.
Aborted due to warnings.
我在我的 grunt 文件中添加了 force:true,但又遇到了另一个错误
clean: {
options: {
force: true
},
dist: {
files: [{
dot: true,
src: [
'.tmp',
'<%= yeoman.dist %>/{,*/}*',
'!<%= yeoman.dist %>/.git{,*/}*'
]
}]
},
server: '.tmp'
},
警告:无法删除“.tmp”文件(EACCES:权限被拒绝, 取消链接“.tmp/styles”)。使用 --force 继续。
【问题讨论】:
-
请添加有关您正在使用的
grunt和yeoman(包括生成器)版本的更多信息。 -
查看
grunt-contrib-clean的文档,我想有一个cwd属性可以解决这个问题