aheckmann / gm

GraphicsMagick for node
http://aheckmann.github.com/gm/
6.95k stars 615 forks source link

Command failed #864

Open seongjin605 opened 12 months ago

seongjin605 commented 12 months ago

Hello,

We're using gm However, we are getting a Command failed error in command.js. What can we do to fix this?

Thanks!

The code in question does the following:

            gm()
                .command('convert')
                .in('+adjoin')
                .in(`./${inputFile}`)
                .write(`./${originalFileName}/${originalFileName}_%d.jpg`, function (err) {
                    if (err) {
                        reject(err);
                    }
                    resolve();
                });
            });

Error Log:

Error: Command failed: \n at ChildProcess.onExit (/app/node_modules/gm/lib/command.js:318:17)\n at ChildProcess.emit (node:events:513:28)\n at ChildProcess.emit (node:domain:489:12)\n at maybeClose (node:internal/child_process:1091:16)\n at ChildProcess._handle.onexit (node:internal/child_process:302:5)

Dockerfile:

FROM node:18.16.0-alpine3.16

RUN sed 's/https/http/g' -i /etc/apk/repositories

RUN apk update && apk add bash
RUN apk add --no-cache git
RUN apk add g++ make py3-pip
RUN apk add --no-cache imagemagick graphicsmagick

WORKDIR /app
ADD . /app/

RUN npm i npm@9 -g

ENTRYPOINT ["npm", "run", "start"]

Our Versions are:

jasrusable commented 6 months ago

I am having the same problem. Any updates?

seongjin605 commented 5 months ago

I am having the same problem. Any updates?

I migrated to sharp because there seems to be no support for this library anymore. 😂