Empty input file with ImageMagick - node.js

I'm using s3-uploader in a node project, which uses node-im-metadata which builds a identify call that throws the error:
Error: Command failed: /bin/sh -c identify -format "name=
size=%[size]
format=%m
colorspace=%[colorspace]
height=%[height]
width=%[width]
orientation=%[orientation]
" /Users/Path/To/File.jpg
identify: Empty input file `/Users/Path/To/File.jpg' # error/jpeg.c/JPEGErrorHandler/322.
at ChildProcess.exithandler (child_process.js:203:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:817:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)
The thing is, the file is definitely not empty. I can load the file just fine, and have re-downloaded the image multiple times. The process worked once but after that it just fails over and over.
If I run the identify call directly in the CLI then it works just fine and returns the metadata on the image.

Related

running mongorestore in exec on node child-process

i am trying to make a mongorestore on child process with exec,
i am running the process on jenkins job, but unfortunately it keeps failing on error code:1
at ChildProcess.exithandler (node:child_process:397:12)
at ChildProcess.emit (node:events:394:28)
at ChildProcess.emit (node:domain:470:12)
at maybeClose (node:internal/child_process:1067:16)
at Process.ChildProcess._handle.onexit (node:internal child_process:301:5) {
killed: false,
code: 1,
signal: null,
if i run the mongorestore locally on my machine it works perfectly,
p.s. the tar i am trying to restore is about 6MB

Getting error in handlebar pdf generation

Unhandled Error Error: Command failed:
/node/NodeJS/sales.packages/sales.dev6.1.0.10131405.4884/libs/../node_modules/phantomjs-1.9.7-linux-x86_64/bin/phantomjs
/node/NodeJS/sales.packages/sales.dev6.1.0.10131405.4884/node_modules/html5-to-pdf/lib-phantom/html5-to-pdf.js
/tmp/tmp-96609fwa8zxt.j8r27qfr.html
/tmp/tmp-966091h65wl2.d81714i.pdf
/node/NodeJS/sales.packages/sales.dev6.1.0.10131405.4884/node_modules/html5-to-pdf
/node/NodeJS/sales.packages/sales.dev6.1.0.10131405.4884/node_modules/html5-to-pdf/pdf.css
/node/NodeJS/sales.packages/sales.dev6.1.0.10131405.4884/node_modules/html5-to-pdf/highlight.css
A4 portrait 1.5cm 500 html5bp
PhantomJS has crashed. Please read the crash reporting guide at https://github.com/ariya/phantomjs/wiki/Crash-Reporting and file a bug report at https://github.com/ariya/phantomjs/issues/new with the crash dump file attached: /tmp/434f7682-c431-9f73-6a83851c-550f411e.dmp
at ChildProcess.exithandler (child_process.js:204:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:886:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

Dynamic Watermark - Command failed: gm convert: Unable to read font

I need the image with the watermark so I am using "dynamic-watermark" node module. While I am starting the app, I get the issue please see below
{ Error: Command failed: gm convert: Unable to read font (n019003l.pfb) [No such file or directory].
at ChildProcess.onExit (E:\Development\NodeJs\npm-modules\dynamic-watermark\node_modules\gm\lib\command.js:301:17)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at ChildProcess.cp.emit (E:\Development\NodeJs\npm-modules\dynamic-watermark\node_modules\gm\node_modules\cross-spawn\lib\enoent.js:40:29)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) code: 1, signal: null }

ZeroC slide2js get wrong

Error: spawn /home/lanceloft/.nvm/versions/node/v6.11.0/lib/node_modules/slice2js/build/Release/slice2js ENOENT
at exports._errnoException (util.js:1018:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3
just do as like Official website demo,but npm install slice2js -g get wrong,
Error: Run "sh -c node-gyp rebuild" error, exit code 1
at ChildProcess.proc.on.code (/usr/lib/node_modules/cnpm/node_modules/runscript/index.js:65:21)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:891:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
but if I execution slice2js say the first error;
please help me
The problem is solved,Because a library file does not exist,
execute sudo apt-get install libssl-dev

Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT

Error: spawn ghc-mod ENOENT
PATH: /usr/bin:/bin:/usr/sbin:/sbin
path: undefined
Path: undefined
Hide Stack Trace
Error
at /Users/Mauritius/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process.coffee:60:28
at exithandler (child_process.js:222:5)
at ChildProcess.errorhandler (child_process.js:229:5)
at emitOne (events.js:77:13)
at ChildProcess.emit (events.js:169:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:441:9)
at process._tickCallback (node.js:355:17
i ran into this problem right now, what i have done is to go Atom , in the header press Atom ->Preferences then Package, for the ide-haskell package go to setting and set the path for stylish-haskell, then for haskell-ghc-mode package also set up ghc mod and ghc modi path

Resources