问题描述
尝试重命名文件夹someProject
,@config-someConfig
,configuration
时,chokidar等待至少10秒,然后报告错误:“错误:EPERM:不允许操作:重命名” >
文件夹结构:
.
+-- configuration
| +-- @config-someConfig
| +-- someProject
| +-- document
| +-- someDocument.txt
版本:
Chokidar版本^ 3.4.2
节点版本:v12.16.1
chokidar代码:
const chokidar = require('chokidar');
const watcher = chokidar.watch('./configuration/@config-*/**/*.*',{
ignorePermissionErrors: true
});
watcher
.on('add',path => console.log(`File ${path} has been added`))
.on('change',path => console.log(`File ${path} has been changed`))
.on('unlink',path => console.log(`File ${path} has been removed`))
.on('addDir',path => console.log(`Directory ${path} has been added`))
.on('unlinkDir',path => console.log(`Directory ${path} has been removed`))
.on('error',error => console.log(`Watcher error: ${error}`))
.on('ready',() => console.log('Initial scan complete. Ready for changes'))
.on('raw',(event,path,details) => { // internal
console.log('Raw event info:',event,details);
});
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)