当我构建一个yeoman角度应用程序时,当我第一次运行它时工作正常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.
Run Code Online (Sandbox Code Playgroud)
当我手动删除.tmp文件夹时,应用程序运行没有错误.
我在网上搜索,但我找不到令人信服的答案.
请指教,
小智 8
我能够通过更新grunt-contrib-clean中的rimraf节点模块的版本来解决这个问题.
$ cd .\node_modules\grunt-contrib-clean
$ npm install rimraf@2.2.8
Run Code Online (Sandbox Code Playgroud)
这看起来像rimraf中的提交修复了这个问题:https://github.com/isaacs/rimraf/commit/1b612ed9370b5a3d0de9bb0ba1a32ea1dc8edba1