start-server-and-test
start-server-and-test copied to clipboard
Throws an error on GitlabCI
It works properly on gitlab ci but at the end it throws strange error
events.js:292
throw er; // Unhandled 'error' event
^
Error: spawn ps ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn ps',
path: 'ps',
spawnargs: [ '-A', '-o', 'ppid,pid,stat,comm' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
package.json
"test:unit": "jest src/*",
"server": "cross-env ENTRY_POINT=main webpack --config webpack.dev.js && http-server dist -p 3330",
"test:e2e": "start-test server http://localhost:3330 test:unit",
[gitlab-ci.output.txt](https://github.com/bahmutov/start-server-and-test/files/5161701/gitlab-ci.output.txt)
Same on Azure #253 and CircleCI #250
@bahmutov any idea on what can it be?
I've switched to wait-on from start-server-and-test
. It works for my case
It seems that the gitlab-runner is missing a dependency. I solved it by doing the following: https://github.com/bahmutov/start-server-and-test/issues/132#issuecomment-448581335