gulp
gulp copied to clipboard
ENOTSUP error when copying files to a fs that doesn't support chmod
What were you expecting to happen?
The files/folders get copied from gulp.src to gulp.dest
What actually happened?
Gulp throws an error with no stacktrace.
Please give us a sample of your gulpfile
var gulp = require('gulp');
gulp.task(function copy() {
return gulp.src('./dist/**/*').pipe(gulp.dest("/run/user/1000/gvfs/mtp:host=OnePlus_IN2025_4f28e22d/Internal shared storage/test/"));
});
Terminal output / screenshots
$ npx gulp copy
[19:52:49] Using gulpfile ~/Documents/VS_Code/testrepo/gulpfile.js
[19:52:49] Starting 'copy'...
[19:52:49] 'copy' errored after 32 ms
[19:52:49] Error: ENOTSUP: operation not supported on socket, chmod '/run/user/1000/gvfs/mtp:host=OnePlus_IN2025_4f28e22d/Internal shared storage/test/build'
Please provide the following information:
- OS & version [e.g. MacOS Catalina 10.15.4]: Ubuntu 21.04
- node version (run
node -v
): v16.13.1 - npm version (run
npm -v
): 8.3.0 - gulp version (run
gulp -v
): CLI version: 2.3.0 Local version: 4.0.2
Additional information
There's no stacktrace, so I don't know where inside of gulp this is coming from, or if it's coming from one of gulp's dependencies. Somewhere, something is trying to chmod
the new directories, which is failing because the filesystem doesn't support chmod. Ideally this error would be ignored - if a filesystem doesn't support chmod then there's no reason to try setting permissions.
I've tried overwriting fs.chmod with a no-op like fs.chmod = (p, m, cb) => cb();
but this had no effect.