node-quickthumb icon indicating copy to clipboard operation
node-quickthumb copied to clipboard

Error: Command failed: identify-im6.q16: unable to open image

Open mllumiquinga194 opened this issue 5 years ago • 1 comments

Greetings, good morning. I go straight to the point, he knows that I am using the library and I am having problems when I try to resize an image that does not exist on the server. Is there any way to control this behavior? I had to migrate my server and in the process I lost some images, so at the time of resizing them, they are obviously not found on the server and therefore throws me an error and my server goes down. I wish I could control the error. Currently my configuration is as follows

    app.use(qt.static(__dirname + '/../uploads', {
      cacheDir: __dirname + '/../uploads/thumbnail'
    }));

mllumiquinga194 avatar Sep 19 '19 15:09 mllumiquinga194

This is the error that is throwing me and I think it is fine because the image does not exist but what I want is to know how to control that error so that my server does not die!

{ Error: Command failed: identify-im6.q16: unable to open image `/home/marcos/Escritorio/ecomybusiness_nestjs/uploads/user-companies/73f18621aaf0eea117f652c8649263410.png': No existe el fichero o el directorio @ error/blob.c/OpenBlob/2701.

    at ChildProcess.<anonymous> (/home/marcos/Escritorio/ecomybusiness_nestjs/node_modules/imagemagick/imagemagick.js:88:15)
    at ChildProcess.emit (events.js:182:13)
    at ChildProcess.EventEmitter.emit (domain.js:441:20)
    at maybeClose (internal/child_process.js:962:16)
    at Socket.stream.socket.on (internal/child_process.js:381:11)
    at Socket.emit (events.js:182:13)
    at Socket.EventEmitter.emit (domain.js:441:20)
    at Pipe._handle.close (net.js:610:12) timedOut: false, killed: false, code: 1, signal: null }

mllumiquinga194 avatar Sep 19 '19 15:09 mllumiquinga194