nnirror/facet

TypeError: fs.rmSync is not a function

Closed this issue · 3 comments

This looks like maybe a cleanup script failing when I do ctrl-c in the terminal?

^C/home/jsimon/Documents/GitHub/facet/js/facet_server.js:39
    fs.readdirSync('tmp/').forEach(f => fs.rmSync(`tmp/${f}`));
                                           ^

TypeError: fs.rmSync is not a function
    at /home/jsimon/Documents/GitHub/facet/js/facet_server.js:39:44
    at Array.forEach (<anonymous>)
    at Object.cleanUp (/home/jsimon/Documents/GitHub/facet/js/facet_server.js:39:28)
    at process.<anonymous> (/home/jsimon/Documents/GitHub/facet/js/facet_server.js:162:18)
    at process.emit (events.js:314:20)

What version of Node are you running? Sounds like fs.rmSync was added to Node v14. I haven't used nvm with Ubuntu, but I use nvm to install and switch between different Node versions. Let me know if that solves it or not!

v12.22.9

Ok, I'll see if I can update node, doesn't look like I have nvm, let me look into it.

Installed nvm and updated to node v19.3.0, problem fixed, thanks.