start-server-and-test icon indicating copy to clipboard operation
start-server-and-test copied to clipboard

Throws an error on GitlabCI

Open IgorBabkin opened this issue 4 years ago • 3 comments

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)

gitlab-ci.output.txt

IgorBabkin avatar Sep 02 '20 10:09 IgorBabkin

Same on Azure #253 and CircleCI #250

@bahmutov any idea on what can it be?

samlucax avatar Sep 13 '20 05:09 samlucax

I've switched to wait-on from start-server-and-test. It works for my case

IgorBabkin avatar Sep 21 '20 09:09 IgorBabkin

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

petermanders89 avatar Feb 11 '21 15:02 petermanders89