When I try to resize an image like this:
gm('public/uploads/1710410635.jpg')
.resize(240, 240)
.noProfile()
.write('public/uploads/1710410635_t.jpg', function (err) {
if (!err) console.log('done');
});
I get this error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:945:11)
at Process.ChildProcess._handle.onexit (child_process.js:736:34)
My file structure is as follows:
The code is executed in the postnewsitem.js
file
why is this error occurring & how do I solve it ?
edit: GraphicsMagick works, proof:
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…