chokidar
chokidar copied to clipboard
Error: EPERM: operation not permitted, rename
Describe the bug
When trying to rename the folder someProject, @config, configuration
chokidar waits at least 10sec and then report an error: 'Error: EPERM: operation not permitted: rename'
Folder structure:
.
+-- configuration
| +-- @config-someConfig
| +-- someProject
| +-- document
| +-- someDocument.txt
Versions:
- Chokidar version ^3.4.2
- Node version: v12.16.1
- OS version: Windows 10
To Reproduce:
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, path, details);
});
Expected behavior Chokidar should rename the folder.
Can add that It only happens when you try to rename folder that contains at least one nested folder.
I meet the problem too.
Set usePolling
to true on win32 fixes my problem.
Same here
Also, this one makes impossible to rename directories inside vscode on windows, which has some content in it.