promise-it-wont-hurt
promise-it-wont-hurt copied to clipboard
Use of deprecated os.tmpDir()
When trying to take a look at any exercise besides the very first one, I got:
/usr/local/lib/node_modules/promise-it-wont-hurt/node_modules/@timothygu/workshopper-wrappedexec/wrappedexec.js:16
var dataPath = path.join(os.tmpDir(), '~workshopper.wraptmp.' + process.pid)
^
TypeError: os.tmpDir is not a function
After some quick googling, found that os.tmpDir() is and has been deprecated for a while now, and os.tmpdir() should be used instead. Upon enacting this substitution, everything worked just fine.
Recommendation: require https://github.com/workshopper/workshopper-wrappedexec instead of outdated fork https://github.com/TimothyGu/workshopper-wrappedexec
(Oops just noticed there are more issues with this, should have left a comment instead)
got same issue as you!
me too
It still throwing the error :(
To solve this problem you have to change line 13 of the file
[node_path]/node_modules/promise-it-wont-hurt/node_modules/@timothygu/workshopper-wrappedexec/wrappedexec.js
os.tmpDir()
change this for that
os.tmpdir()
You could use nvm to temporarily switch to an older version of Node.
Line 9 : os.tmpDir = os.tmpdir;
Line 12 : var dataPath = path.join(os.tmpDir(), '~workshopper.wraptmp.' + process.pid)
How do we edit it now to make sure that we don't face any issues ?
thanks a lot bro