当我构建一个 yeoman angular 应用程序时,当我第一次运行它时,它使用 grunt serve
运行良好但是当我第二次运行它时,grunt clean task
出现错误如下:
Cleaning .tmp...ERROR
Warning: Unable to delete ".tmp" file (EPERM, operation not permitted '...\.tmp'). Use --force to continue.
Aborted due to warnings.
当我手动删除 .tmp 文件夹时,应用程序运行时没有错误。
我搜索了网络和此处,但找不到令人信服的答案。
请指教,
最佳答案
我可以通过更新 grunt-contrib-clean 中的 rimraf 节点模块的版本来解决这个问题。
$ cd .\node_modules\grunt-contrib-clean
$ npm install rimraf@2.2.8
这看起来像是 rimraf 中修复问题的提交:https://github.com/isaacs/rimraf/commit/1b612ed9370b5a3d0de9bb0ba1a32ea1dc8edba1
关于gruntjs - grunt clean 无法删除 ".tmp"文件(EPERM,不允许操作),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23541343/