-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sometimes cpx fails to copy files and directories #29
Comments
Also migrating to the latest chokidar also would be nice |
Thank you for this issue. Could you make a concrete proposal?
|
Sometimes not all files are copied for some reasons, we want to try to pass |
@mysticatea Maybe you can actually fix real issues:
You can see more discussions on this PR: eclipse-theia/theia#156 The issue seems to be related to when and how fast events are produced by chokidar. I see that vscode buffers events from chokidar and only when 50 milliseconds passed and there were no new events from chokidar it propagates buffered to the client code: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts#L25. It could be that it is done to overcome issues like stated above. Also Right now it is a showstopper issue for us to continue using cpx. |
Thank you for the information. I'm sorry that I failed to get time in the last weekend because of my job was busy. I'll work within some days, I have 4 days' holiday since 6/1. |
I've ended up using gulp 4 instead for watching and copying. It uses https://github.com/gulpjs/glob-watcher for watching that behaves quite deterministic. And for copying one can use |
@akosyakov, is this the reason I sometimes see files not copied, but a 0-byte "copy" created in the target directory instead? |
@bobbylight @mysticatea I'm noticing the same behavior. I raised a similar issue about postcss-cli (postcss/postcss-cli#215) which was fixed by adjusting the chokidar options as mentioned. Babel has a similar fix in place at https://github.com/babel/babel/blob/ab62a9439918edf97eeea730a444a622542696ff/packages/babel-cli/src/babel/dir.js#L152-L155, so it seems to be a common workaround. |
Is this ever going to be fixed? For me it fails about 40% of the time. Is there any replacement for this module if it is not going to be fixed? |
sometimes chokidar should be tuned to a concrete OS to work reliable, be able to pass chokidar options will be nice
The text was updated successfully, but these errors were encountered: