I get an error using GM() on my remote server, I think i get an issue when I try to write the file... It works perfectly on my local server...
My code :
gm()
.in('-page', '+0+0')
.in('/var/www/myapp/public/images/instabox.jpg')
.in('-page', '+10+10')
.in(image)
.mosaic()
.minify()
.write(newFileName, function (err) { // newfilename = '/var/www/myapp/public/uploads/mydir/image.jpg'
if (!err) console.log('done');
if (err) console.log(err);
callback();
});
My error :
{ [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' }
Response of the issue:
I put back GM on my remote server and it was the issue, GM was not well installed...
read/write
permission over that area... or run your app withsudo
– Ravigm
on the remote server via a terminal? – mscdex