Closed C3l1n closed 5 years ago
Confirmed, the issue is because you are using a very old version of NodeJS. i will just update the minimum dependency of node to the last LTS (12)
$ cd node-v8.16.2-darwin-x64/
$ cd bin/
$ ./node
> const fs = require("fs")
undefined
> fs.mkdirSync("foo", {recursive:true})
undefined
> fs.mkdirSync("foo", {recursive:true})
Error: EEXIST: file already exists, mkdir 'foo'
at Object.fs.mkdirSync (fs.js:885:18)
>
vs node10
$ node
> const fs = require("fs")
undefined
> fs.mkdirSync("foo", {recursive:true})
undefined
> fs.mkdirSync("foo", {recursive:true})
undefined
> fs.mkdirSync("foo", {recursive:true})
undefined
> $ node -v
v10.15.1
$
Confirmed, the issue is because you are using a very old version of NodeJS. i will just update the minimum dependency of node to the last LTS (12)
$ cd node-v8.16.2-darwin-x64/ $ cd bin/ $ ./node > const fs = require("fs") undefined > fs.mkdirSync("foo", {recursive:true}) undefined > fs.mkdirSync("foo", {recursive:true}) Error: EEXIST: file already exists, mkdir 'foo' at Object.fs.mkdirSync (fs.js:885:18) >
vs node10
$ node > const fs = require("fs") undefined > fs.mkdirSync("foo", {recursive:true}) undefined > fs.mkdirSync("foo", {recursive:true}) undefined > fs.mkdirSync("foo", {recursive:true}) undefined > $ node -v v10.15.1 $
Sorry I've been busy for the last few days. It's true I have real old node on thix machine it's 8.11. Thanks for help.
I am not a big fan of ignoring errors, and eexist shouldnt be raised with mkdir when the recursive option is set. I did a bunch of tests about this. So my guess is that the error could be related to a change in the behaviour between versions of nodejs.
Which version are u using? Im on 10.15.1