GithubHelp home page GithubHelp logo

Comments (7)

sindresorhus avatar sindresorhus commented on May 29, 2024

Seems more like a Node.js bug. It should consistently throw that error on all platforms, not just macOS.

from del.

silverwind avatar silverwind commented on May 29, 2024

I suspect the EILSEQ is either an APFS limitation or a libuv bug.

from del.

silverwind avatar silverwind commented on May 29, 2024

Regarding the deletion bug I think best course of action is to use fs.rmdir with the recursive option instead of rimraf while making sure that if a Buffer is passed, it is passed through to any fsfunction.

But to my knowledge recursive is only available on node 12.16 or higher.

from del.

sindresorhus avatar sindresorhus commented on May 29, 2024

But to my knowledge recursive is only available on node 12.16 or higher.

We could check for that and at least do the right thing for those versions.

from del.

silverwind avatar silverwind commented on May 29, 2024

I'd prefer a backport of nodejs/node#29168 to v10, thought I'd also be fine if it's only done on 12.16 or greater. I'm not sure it's possible to feature-detect the recursive option.

from del.

silverwind avatar silverwind commented on May 29, 2024

I think it's probably better I workaround this in my module because:

  • rimraf does not deal correctly with invalid UTF8 files and while it could be fixed in them, I see the chance that a PR for this would be accepted as very low.
  • Fixing this would require version detection, various manual code to handle buffer paths and it would only work on Node 12.
  • fs.rmdir does not support globs so using it would not get rid of dependencies.

from del.

silverwind avatar silverwind commented on May 29, 2024

Edited above. I think the root cause may be somewhere in globby or its dependencies. To really fix it, those modules would have to avoid passing around paths as string and use Buffers exclusively because Buffer.from([0x78, 0xf6, 0x6c, 0x78]) can not be represented as an UTF-8 string.

from del.

Related Issues (20)

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.