Giter Site home page Giter Site logo

Comments (13)

schnittstabil avatar schnittstabil commented on August 12, 2024

@IMPinball Thank you for reporting that. It is because we use Promise.all at the moment.
@sindresorhus You could assign me to fix it.

from del.

sindresorhus avatar sindresorhus commented on August 12, 2024

👍

from del.

dgreene1 avatar dgreene1 commented on August 12, 2024

It looks like @schnittstabil has some kind of fix. Sorry for not being too familiar with forking, but will his solution join back up with the main del repository soon?

Thank you.

from del.

schnittstabil avatar schnittstabil commented on August 12, 2024

Sorry I cannot reproduce that bug anymore.
@isiahmeadows, @dgreene1: Are you still experiencing that problem?

from del.

dead-claudia avatar dead-claudia commented on August 12, 2024

Not anymore.

On Tue, Jan 12, 2016, 04:30 Michael Mayer [email protected] wrote:

Sorry I cannot reproduce that bug anymore.
@isiahmeadows https://github.com/isiahmeadows, @dgreene1
https://github.com/dgreene1: Are you still experiencing that problem?


Reply to this email directly or view it on GitHub
#43 (comment).

from del.

dgreene1 avatar dgreene1 commented on August 12, 2024

I see it about 1 in 10 times on my local dev machine. Our build server sees it pretty often. I think it's easier to recreate when you have multiple gulp tasks that are calling del since gulp is async.

Since it looks like there's already a fix from @schnittstabil, can we just get it pulled in @sindresorhus ?

from del.

schnittstabil avatar schnittstabil commented on August 12, 2024

@dgreene1 Would it be possible to provide us your platform and a stack trace or your gulpfile?

As an interim solution you may want to use the fork in your package.json to check out its validity:

  "devDependencies": {
    "del": "github:schnittstabil/del#fix-race-condition"
  }

from del.

schnittstabil avatar schnittstabil commented on August 12, 2024

Ping @dgreene1.

I've tried del in async (multiple promises) and parallel (multiple processes) mode on hundreds of deeply nested files and folders, without luck.

from del.

schnittstabil avatar schnittstabil commented on August 12, 2024

Not reproducible anymore. Closing, but please re-open if it still occurs.

from del.

cguinnup avatar cguinnup commented on August 12, 2024

Have been receiving this error sporadically while using 2.2.1, just now reporting. (I see the latest is 2.2.2 but it doesn't seem to address this issue?) The ENOTEMPTY occurs 1 in 10 times as @dgreene1 mentioned, yet afterward I "ls -al" the dir and there aren't even hidden files inside.

Will be unable to use 'del' in our Gulp integration builds if it keeps failing unpredictably.

from del.

schnittstabil avatar schnittstabil commented on August 12, 2024

@pizza2code Would it be possible to provide us your gulpfile?

The most likely reasons causing ENOTEMPTY:

  1. creation and deletion of files are running concurrently
  2. another process creates files during deletion.

An example of 1.

gulp.task('clean', function () {
  del('folder/**'); // missing 'return' !
});

gulp.task('default', ['clean'], function () {
  // create some files
});

An example of 2.:

A Finder instance may create .DS_Store files during deletion for some reason (see #42 (comment))

from del.

cguinnup avatar cguinnup commented on August 12, 2024

You're right, it was a process creating files during deletion. Sorry about that, and thanks for the help!

from del.

nahtnam avatar nahtnam commented on August 12, 2024

Sorry, dont want to bring up an old thread but the ^ above was right. A process was creating files during the deletion. If you are making use of promises, make sure you await or use .then(). I forgot the await when the files were being created, so it quickly moved on to the deletion phase, rendering the issue.

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.