Reputation: 1385
I am planning to save my resized image to a directory that is not yet created. This is my first time doing file manipulation on nodejs, and for some reason I am having this error. Am I missing something?
Code Here: http://pastebin.com/LxRqciXN
Upvotes: 0
Views: 936
Reputation: 48376
If you try to create a folder inside one non existing folder through fs.mkdir
. This error 4058
could come up. This problem can be solved by fs-extra module
var fs = require('fs-extra')
fs.mkdirs('/tmp/some/long/path/that/prob/doesnt/exist', function (err) {
if (err) return console.error(err)
console.log("success!")
})
Upvotes: 1