Coder Social home page Coder Social logo

fs-mkdirp-stream's People

Contributors

coreyfarrell avatar erikkemperman avatar github-actions[bot] avatar phated avatar sttk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fs-mkdirp-stream's Issues

System Errors don't seem to have a stack trace

In exploring #2 and gulpjs/async-done#45, I found that Errors generated by syscalls (like ENOENT from a fs.stat) don't seem to have a Stack Trace. You can get them to have one by calling Error.captureStackTrace(err) but we don't do that on any of our errors that come from node's fs module.

@erikkemperman @contra @terinjokes do ya'll think we should capture stack traces before forwarding the errors? It's pretty annoying to track down Error: ENOENT: no such file or directory, stat '/Users/phated/test/testcase-vinyl-bug/outbad'

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.

node.js version support

This is a follow-up to #6 (comment) where I pointed out use of a 10.12.0 form of options argument to fs.mkdir. I'm thinking we might want to specify engines.node >=10.12.0 or >=10.13.0 on everything anyways. It is very common in the ecosystem for packages that support node.js 10+ to either require recursive fs.mkdir (10.12.0) or to not support minor releases before LTS (10.13.0).

Supporting 10.0.0 brings little value and will setup a long term conflict with both production and development dependencies. For example eslint 7.0.0 (just released) declares support for node.js ^10.12.0 || >=12.0.0. babel 8 and nyc 16 also will not support node.js 10.0.0 - 10.11.x. These are examples of packages which will explicitly declare non-support for older point releases of 10.x. Many packages will simply declare support for >=10 but only work on >=10.12.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.