Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: spawn ps ENOENT #132

Closed
lorensr opened this issue Dec 1, 2018 · 5 comments
Closed

Error: spawn ps ENOENT #132

lorensr opened this issue Dec 1, 2018 · 5 comments

Comments

@lorensr
Copy link

lorensr commented Dec 1, 2018

Is this a bug report or a feature request?

Bug

  • version
npm -v start-server-and-test
5.6.0
  • platform
    linux: alpine-node
  • expected behavior
    Exits with code 0 at end of test
  • actual behavior
    After tests complete, I get Error: spawn ps ENOENT, and exits with code 1
    All specs passed!                           00:27       15       15        -        -        -  

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: spawn ps ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
    at onErrorNT (internal/child_process.js:407:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
    at onErrorNT (internal/child_process.js:407:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! packlist@0.1.0 test:e2e: `start-server-and-test start:qa http-get://0.0.0.0:8080 cy:run`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the packlist@0.1.0 test:e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-12-01T05_09_26_197Z-debug.log
Exited with code 1

It looks like this started when I added env to the beginning of start:web?

    "start:web": "env APP_ENV=dev webpack-dev-server --inline --hot --host 0.0.0.0",
    "test:e2e": "start-server-and-test start:web http-get://0.0.0.0:8080 cy:run",
    "cy:run": "cypress run",

I need to keep env. Any suggestions on what I should try? Thanks!

@lorensr
Copy link
Author

lorensr commented Dec 4, 2018

This catch() function is not being called:

startAndTest({ start, url, test }).catch((e) => {
  console.error('here', e);
  process.exit(1);
});

@Winify
Copy link

Winify commented Dec 6, 2018

This catch() function is not being called:

startAndTest({ start, url, test }).catch((e) => {
  console.error('here', e);
  process.exit(1);
});

Had the same problem, I switched the docker base to node:10.11.0-alpine and the start-server-and-test package version from 1.7.11 to 1.7.1 and somehow these changes did the trick for me.

@hapit
Copy link

hapit commented Dec 19, 2018

I had the same problem in a different project. The reason is that alpine doesn't have the 'ps' command istalled by default.

I fixed it by installing it in my container:
sudo apt-get update && sudo apt-get -y install procps

@lorensr
Copy link
Author

lorensr commented Dec 28, 2018

Thank you! That fixed

@lorensr lorensr closed this as completed Dec 28, 2018
@JeremyCraigMartinez
Copy link

If you were using alpine, wouldn't this apt-get command have to be apk add?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants