Problems with gm (Graphicsmagick) and Node.js module

Asked

Viewed 84 times

0

I am doing a test project to see the features of gm module, because I need to manipulate images on the server (resize, place Watermark, generate Thumb, among others).

Well, I installed Graphicsmagick via Homebrew using the command

brew install GraphicsMagick

And the installation rolled ok.

I installed the module in the project via npm using

npm install gm --save

I’m using express, and in mine route I used the following code

exports.tamanho = function(req, res){

gm('./images/1.jpg').size(function(err, value){
  if(err) res.json(500, {message: err});
  res.json(200, {messagem: value});
});}

Doing the proper require on top using var gm = require('gm');

This code is returning to me an error that I could not identify

{message:{"code": null,signal": "SIGTRAP"}}

Someone who has had a similar problem knows what it can be, if it can be solved or if it has some other good module to use for the tasks I need?

1 answer

1


I decided to remove the installed Imagemagick and Graphicsmagick. I reinstalled only Graphicsmagick and it worked.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.