Syncy fails to sync files for me with this minimal gulp example:
```js
var gulp = require('gulp');
var syncy = require('syncy');
function sync(cb){
syncy(['src/**'], 'dest', {base: 'src'})
.then(cb(console.log('Sync complete')))
.catch(console.error);
}
gulp.task('dev', gulp.series(sync));
```
After running the gulp file, the console logs "Sync complete", and indeed the dest folder was created, and inside it is index.html file which was in the src folder. The contents of the synced files are empty however: every file is exactly 0 bytes (regardless of file type).
I fear this might by OS specific, as the code does not work for me (ArchLinux, npm 6.4.1, [email protected]), while it did work as intended on a PC running windows.
Had the same issue but on Windows 10, running the latest NodeJS (11.0.0) and the latest Syncy (2.2.2).
Downgraded NodeJS to the LTS version (8.12.0) and it worked again, so it seems to be broken on the new NodeJS.
Is there a way to fix this? @mrmlnc
Really like the functionality of Syncy but would be nice if it wasn't dependent on the version of NodeJS..
I found underlying issue: there's an associated issue in the "cp-file" package, see https://github.com/sindresorhus/cp-file/issues/25. It has been fixed in cp-file 7.0.0 so updating that dependency to 7.0.0 should resolve this bug.
I would recommend fast-tracking this as a hotfix as this is necessarily breaking all uses of the package and 10.x is now the current LTS version of node.