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
Related
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)
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.
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 }
I'm using jade-cli to compile my project from .jade files into .html.
Jade files have following hierarchy:
components
views
templates
...
I want rendered result to have same folder structure and trying to use -H attribute as it is said in documentation here: https://www.npmjs.com/package/jade-cli
However when I'm using command jade -P -H src -o dst npm returns following error:
silly lifecycle #~build: Args: [ '/d /s /c', 'jade -P -H src -o dst' ]
12 silly lifecycle #~build: Returned: code: 1 signal: null
info lifecycle #~build: Failed to exec build script
verbose stack Error: # build: `jade -P -H src -o dst`
verbose stack Exit status 1
verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
verbose stack at emitTwo (events.js:106:13)
verbose stack at EventEmitter.emit (events.js:191:7)
verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
verbose stack at emitTwo (events.js:106:13)
verbose stack at ChildProcess.emit (events.js:191:7)
verbose stack at maybeClose (internal/child_process.js:877:16)
verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
error Windows_NT 6.1.7601
error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
error node v6.9.1
error npm v3.10.8
error code ELIFECYCLE
error # build: `jade -P -H src -o dst`
error Exit status 1
error Failed at the # build script 'jade -P -H src -o dst'.
error Make sure you have the latest version of node.js and npm installed.
error If you do, this is most likely a problem with the package,
error not with npm itself.
error Tell the author that this fails on your system:
error jade -P -H src -o dst
error You can get information on how to open an issue for this project with:
error npm bugs
error Or if that isn't available, you can get their info via:
error npm owner ls
error There is likely additional logging output above.
verbose exit [ 1, true ]
If -H is excluded everything runs fine. What seems to be the problem?
npm version: 6.9.1
jade version: 1.11.0
Issue has been resolved. My mistake was that I thought jade-cli was part of common jade package. Appears that you have to install it separately using
npm i jade-cli -g
-g for installing it globally.
After this compilation goes successfully and creates all necessary folder architecture
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.