Getting error in handlebar pdf generation - node.js

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)

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

npm run script error: Failed to exec generateservertestreport script

I see this issue when I run npm script through tfs build but when I run the above directly tfs build machine I don't see any error.
Note: I use node -v 8.12.0 and npm -v 6.4.1
I tried to find the reason for this error I didn't find resource explaining me the reason for this error
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\cygwin64\home\licbuild\ANSYSDev\LicensingPortal\node\node-v8.12.0-win-x64\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (C:\cygwin64\home\licbuild\ANSYSDev\LicensingPortal\node\node-v8.12.0-win-x64\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:915:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
If you are able to run the script through TFS build machine directly but failed through TFS build.
This may caused by permission of your build service account such as local Admin. You may use a different account to remote build machine and run the script other than your build service account.
To narrow down the issue, you could also use build service account directly login your build machine and try to run the script again if still get same result.
Besides, you could also set system.debug=true to get a more detail build log for troubleshooting.

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

Empty input file with ImageMagick

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.

Resources