function conversion(image) {
const image = gm(image);
image.orientation(function(err, value) {
if (err) {
console.log("Error Occurred :",err);
}
}
Error: write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js:154:25)
at writeGeneric (internal/stream_base_commons.js:145:3)
at Socket._writeGeneric (net.js:786:11)
at Socket._write (net.js:798:8)
at doWrite (_stream_writable.js:403:12)
at writeOrBuffer (_stream_writable.js:387:5)
at Socket.Writable.write (_stream_writable.js:318:11)
at gm._spawn (/var/task/node_modules/gm/lib/command.js:253:18)
at gm._exec (/var/task/node_modules/gm/lib/command.js:190:17)
at gm.proto.<computed> [as orientation] (/var/task/node_modules/gm/lib/getters.js:68:12) {
errno: 'EPIPE',
code: 'EPIPE',
syscall: 'write'
}```
While accessing image.orientation the above error occurs.
These are some steps which i have already performed.
1. i have tried installing both imagemagick and graphicsmagick. https://www.npmjs.com/package/gm
2. Also there was suggestion to reinstall imagemagick and graphicsmagick and testing after restarting system. it also didn't worked
3. i am using Ubuntu , npm gm version:"^1.23.1", node version : nodejs12.x