I'm trying to get my Karma Unit tests to run on a remote Jenkins server. This Jenkins server is running on Linux with an old version of PhantomJS already installed and PHANTOMJS_BIN defined in the env. I'm using the gulp-karma and karma-phantomjs-launcher-nonet packages to run the karma tests.
However, when jenkins fires Karma, it seems to be unable to spawn PhantomJS. I get the following error:
[13:33:00] Starting Karma server... [32mINFO [karma]: [39mKarma v0.12.37 server started at http://localhost:9876/ [32mINFO [launcher]: [39mStarting browser PhantomJS [31mERROR [karma]: [39m{ [Error: spawn EACCES] code: 'EACCES', errno: 'EACCES', syscall: 'spawn' } Error: spawn EACCES at exports._errnoException (util.js:874:11) at ChildProcess.spawn (internal/child_process.js:298:11) at exports.spawn (child_process.js:339:9) at Object._execCommand (/appl/jenkins/workspace/ps-lib/node_modules/karma/lib/launchers/process.js:63:21) at Object._start (/appl/jenkins/workspace/ps-lib/node_modules/karma-phantomjs-launcher-nonet/index.js:40:10) at Object. (/appl/jenkins/workspace/ps-lib/node_modules/karma/lib/launchers/process.js:14:10) at emitOne (events.js:82:20) at Object.emit (events.js:169:7) at Object.start (/appl/jenkins/workspace/ps-lib/node_modules/karma/lib/launchers/base.js:40:10) at /appl/jenkins/workspace/ps-lib/node_modules/karma/lib/launcher.js:88:15 at Array.forEach (native) at [object Object].launch (/appl/jenkins/workspace/ps-lib/node_modules/karma/lib/launcher.js:40:11) at [object Object].invoke (/appl/jenkins/workspace/ps-lib/node_modules/karma/node_modules/di/lib/injector.js:75:15) at Server. (/appl/jenkins/workspace/ps-lib/node_modules/karma/lib/server.js:62:18) at Server.g (events.js:260:16) at emitNone (events.js:72:20) at Server.emit (events.js:166:7) at emitListeningNT (net.js:1260:10) at doNTCallback1 (node.js:430:9) at process._tickCallback (node.js:352:17)
/appl/jenkins/workspace/ps-lib/tasks/test.js:15 throw err; ^
Error: karma exited with code 1
at done (/appl/jenkins/workspace/ps-lib/node_modules/gulp-karma/index.js:56:30)
at ChildProcess. (/appl/jenkins/workspace/ps-lib/node_modules/gulp-karma/index.js:82:7)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
So it seems to me that my karma is unable to run PhantomJS due to authorisation reasons, am I right? Still the phantomjs installation is done with user jenkins//jenkins so jenkins should be able to run it, right?
Related
Attempting to install Dependencies for a project. yarn install and npm install both not working. (npm installis working on other projects.)
Running yarn install is returning the error:
Internal Error: Error when performing the request
at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\corepack\dist\corepack.js:16073:20)
at ClientRequest.emit (node:events:512:28)
at TLSSocket.socketErrorListener (node:_http_client:496:9)
at TLSSocket.emit (node:events:512:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
I'm not using a Proxy so any solutions I could find did not work for me.
I want to deploy ma project on my server Hostinger. When I run 'npm run build' in my server it's does'nt works, and I have this error :
> portfolio#0.1.0 build
> vue-cli-service build
All browser targets in the browserslist configuration have supported ES module.
Therefore we don't build two separate bundles for differential loading.
⠋ Building for production...node:events:491
throw er; // Unhandled 'error' event
^
Error: spawn /home/u350660357/domains/damienlaitani.com/public_html/portfolio/portfolio/node_modules/node/bin/node EAGAIN
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -11,
code: 'EAGAIN',
syscall: 'spawn /home/u350660357/domains/damienlaitani.com/public_html/portfolio/portfolio/node_modules/node/bin/node',
path: '/home/u350660357/domains/damienlaitani.com/public_html/portfolio/portfolio/node_modules/node/bin/node',
spawnargs: [
'/home/u350660357/domains/damienlaitani.com/public_html/portfolio/portfolio/node_modules/thread-loader/dist/worker.js',
20
]
}
Node.js v18.7.0
But in my localhost the command 'npm run build' works correctly.
I using Vue.js Version 3.2.13
npm version in server : 8.19.2
node version in server : 18.7.0
npm version in local : 8.15.0
node version in local : 16.17.0
Do you have idea to help me, please ?
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
I'm trying to convert a markdown to pdf using the npm package markdown-pdf with the code below of index.js and I'm getting these errors after run node index.js.
The first error I got is on my Windows 10 Host Machine, and the second one is on my Ubuntu Guest VirtualBox VM.
Any idea of how to solve this? Anything related with phantomjs package?
index.js
var markdownpdf = require("markdown-pdf"),
fs = require("fs")
markdownpdf().from("./README.md").to("./curriculo.pdf", function() {
console.log("Converted to PDF successfully!")
})
Terminal Output Error - Windows Host VM
internal/child_process.js:319
throw errnoException(err, 'spawn');
^
Error: spawn EPERM
at exports._errnoException (util.js:1018:11)
at ChildProcess.spawn (internal/child_process.js:319:11)
at exports.spawn (child_process.js:378:9)
at Object.exports.execFile (child_process.js:143:15)
at WriteStream.<anonymous>
(C:\Users\User\Documents\localdev\curriculo\node_modules\markdown-pdf\index.js:117:22)
at emitNone (events.js:91:20)
at WriteStream.emit (events.js:185:7)
at finishMaybe (_stream_writable.js:512:14)
at afterWrite (_stream_writable.js:386:3)
at onwrite (_stream_writable.js:376:7)
Terminal Output Error - Ubuntu Guest VM
stream.js:74
throw er; // Unhandled stream error in penter code hereipe.
^
Error: spawn /media/sf_localdev/curriculo/node_modules/phantomjs-prebuilt/lib/phantom\bin\phantomjs.exe ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
I'm using Windows 7 64-bit. When I execute the command bower list from the command prompt, it shows the following errors:
D:\ng>bower list
bower check-new Checking for new versions of the project dependencies..
bower error Request to https://bower.herokuapp.com/packages/bootstrap fa
iled: 6512:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:o
penssl\ssl\s23_clnt.c:787:
Stack trace:
Error: Request to https://bower.herokuapp.com/packages/bootstrap failed: 6512:er
ror:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s2
3_clnt.c:787:
at createError (C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\npm\node_modules\bow
er\node_modules\bower-registry-client\lib\util\createError.js:2:15)
at Request._callback (C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\npm\node_modul
es\bower\node_modules\bower-registry-client\lib\lookup.js:98:29)
at self.callback (C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\npm\node_modules\b
ower\node_modules\bower-registry-client\node_modules\request\request.js:129:22)
at Request.EventEmitter.emit (events.js:95:17)
at Request.request.emit (C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\npm\node_mo
dules\bower\node_modules\bower-registry-client\node_modules\request-replay\index
.js:69:33)
at ClientRequest.self.clientErrorHandler (C:\Users\xxxxx.xxxxxxxx\AppData\Ro
aming\npm\node_modules\bower\node_modules\bower-registry-client\node_modules\req
uest\request.js:239:10)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at CleartextStream.socketErrorListener (http.js:1547:9)
at CleartextStream.EventEmitter.emit (events.js:95:17)
at SecurePair.<anonymous> (tls.js:1400:15)
Console trace:
Trace
at StandardRenderer.error (C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\npm\node_
modules\bower\lib\renderers\StandardRenderer.js:72:17)
at Logger.<anonymous> (C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\npm\node_modu
les\bower\bin\bower:111:22)
at Logger.EventEmitter.emit (events.js:95:17)
at Logger.emit (C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\npm\node_modules\bow
er\node_modules\bower-logger\lib\Logger.js:29:39)
at C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\npm\node_modules\bower\lib\comman
ds\index.js:40:20
at _rejected (C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\npm\node_modules\bower
\node_modules\q\q.js:797:24)
at C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\npm\node_modules\bower\node_modul
es\q\q.js:823:30
at Promise.when (C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\npm\node_modules\bo
wer\node_modules\q\q.js:1035:31)
at Promise.promise.promiseDispatch (C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\
npm\node_modules\bower\node_modules\q\q.js:741:41)
at C:\Users\xxxxx.xxxxxxxx\AppData\Roaming\npm\node_modules\bower\node_modul
es\q\q.js:557:44
System info:
Bower version: 1.3.8
Node version: 0.10.28
OS: Windows_NT 6.1.7601 ia32
Does anyone know what causes this error?