节点js + imagemagick +错误:生成ENOENT

时间:2015-05-26 12:09:23

标签: node.js imagemagick

您正在尝试使用node.js

实现Imagemagick包

我添加了以下代码。

var im = require('imagemagick');

router.post('/conversation/start', function(req, res) {

    var args = ["/public/images/team/rajini.jpg", "-crop", "120x80+30+15", "output.png"];

    im.convert(args, function(err) {
        if (err) {
            throw err;
        }
        res.end("Image crop complete");
    });
});

但是我在终端中收到以下错误。

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:988:11)
    at Process.ChildProcess._handle.onexit (child_process.js:779:34)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

0 个答案:

没有答案