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

More friendly error message when ps is not available #29

Open
OJezu opened this issue Nov 27, 2019 · 0 comments
Open

More friendly error message when ps is not available #29

OJezu opened this issue Nov 27, 2019 · 0 comments

Comments

@OJezu
Copy link

OJezu commented Nov 27, 2019

If no ps program is available on Linux, this package throws a generic ENOENT error. When this library is a dependency of dependency, its not immediately clear where from exactly the error is coming. For ease of debugging, maybe a custom error should be thrown, with message like "tree-kill package needs ps command to be available in PATH" or similar.

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

Error: spawn ps ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn ps',
  path: 'ps',
  spawnargs: [ '-o', 'pid', '--no-headers', '--ppid', 185 ]
}

see nestjs/nest-cli#484

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

1 participant