【发布时间】:2016-03-04 12:50:39
【问题描述】:
我有一个 Sails Api,它第一次启动就像一个魅力。 按 CTRL + C 停止它,然后尝试再次启动它。它有效,但是,
error: ** Grunt :: An error occurred. **
error:
------------------------------------------------------------------------
Aborted due to warnings.
Running "clean:dev" (clean) task
Warning: Cannot delete files outside the current working directory.
------------------------------------------------------------------------
error: Looks like a Grunt error occurred--
error: Please fix it, then **restart Sails** to continue running tasks (e.g. watching for changes in assets)
error: Or if you're stuck, check out the troubleshooting tips below.
error: Troubleshooting tips:
error:
error: *-> Are "grunt" and related grunt task modules installed locally? Run `npm install` if you're not sure.
error:
error: *-> You might have a malformed LESS, SASS, CoffeeScript file, etc.
error:
error: *-> Or maybe you don't have permissions to access the `.tmp` directory?
error: e.g., `folderthingy` ?
error:
error: If you think this might be the case, try running:
error: sudo chown -R 501 folderthingy
好吧,我检查了所有内容,该文件夹是我自己的并且有足够的权限。我还安装了 777 用于测试目的,但这并没有改变任何事情。
然后,我决定清除 .tmp 文件夹的所有内容并尝试重新启动。这就像一个魅力,.tmp 再次被填充,当我停止服务器,尝试重新启动它时,我再次收到完全相同的错误消息!
我正在使用 --no-frontend 选项启动,所以实际上我不明白它为什么要加载 grunt。
为什么会这样?这里出了什么问题?
【问题讨论】: