fs-extra version: 9.1.0 (it's a storybook dependency)
I ran into an issue while using storybook recently, wherein it is copying static files into a directory using fs-extra. For my particular project, I had a couple of static file locations and were copying the multiple sources to a single destination. Ran into an issue that I think comes down to a race condition of sorts, where fs-extra believes the directory to not exist, even though it does because it just created it, and it therefore throws an error on the mkdir call. Here is the offending line:
https://github.com/jprichardson/node-fs-extra/blob/master/lib/copy/copy.js#L157
fs-extra
version: 9.1.0 (it's a storybook dependency)I ran into an issue while using storybook recently, wherein it is copying static files into a directory using fs-extra. For my particular project, I had a couple of static file locations and were copying the multiple sources to a single destination. Ran into an issue that I think comes down to a race condition of sorts, where fs-extra believes the directory to not exist, even though it does because it just created it, and it therefore throws an error on the
mkdir
call. Here is the offending line: https://github.com/jprichardson/node-fs-extra/blob/master/lib/copy/copy.js#L157error thrown:
would something like this do the trick?
if (err && !(err.code === 'EEXIST' && opts.overwrite))
i'm nervous to change such a broad implementation for my one use case!