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"]
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:
Error Log:
Dockerfile:
Our Versions are: