spawn ENOENT error with NodeJS

 ̄綄美尐妖づ 提交于 2019-12-02 19:57:34

问题


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...

来源:https://stackoverflow.com/questions/26232590/spawn-enoent-error-with-nodejs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!